1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

ci: fix checking for presence of CI_GITHUB_API_KEY

CI_GITHUB_API_KEY is always set when evaluating job include/exclude conditions, and it only gets removed when the job starts. Move the check into the script.
This commit is contained in:
Ivan Grokhotkov 2018-12-14 14:40:11 +08:00
parent 8ede8f1459
commit 2687712772

View File

@ -63,22 +63,25 @@ jobs:
- BUILD_TYPE=style_check - BUILD_TYPE=style_check
install: install:
- > - >
[ "$BUILD_TYPE" = "style_check" ] && { if [ ! -f $HOME/astyle/build/gcc/bin/astyle ]; then
[ -f $HOME/astyle/build/gcc/bin/astyle ] || {
wget -O astyle_3.1_linux.tar.gz https://sourceforge.net/projects/astyle/files/astyle/astyle%203.1/astyle_3.1_linux.tar.gz/download; wget -O astyle_3.1_linux.tar.gz https://sourceforge.net/projects/astyle/files/astyle/astyle%203.1/astyle_3.1_linux.tar.gz/download;
tar -xf astyle_3.1_linux.tar.gz -C $HOME; tar -xf astyle_3.1_linux.tar.gz -C $HOME;
make -C $HOME/astyle/build/gcc; make -C $HOME/astyle/build/gcc;
} fi
make -C $HOME/astyle/build/gcc prefix=$HOME install; make -C $HOME/astyle/build/gcc prefix=$HOME install;
} || true
# Deploy stage. # Deploy stage.
# Here we build the package JSON (always) and do the deployments # Here we build the package JSON (always) and do the deployments
- name: "Package / deploy" - name: "Package / deploy"
stage: deploy stage: deploy
script: $TRAVIS_BUILD_DIR/tests/common.sh script:
- >
if [ -n "$CI_GITHUB_API_KEY" ]; then
$TRAVIS_BUILD_DIR/tests/common.sh
else
echo "Not building the package."
fi
env: BUILD_TYPE=package env: BUILD_TYPE=package
if: env(CI_GITHUB_API_KEY) IS present
deploy: deploy:
# Create Github release, upload artifacts # Create Github release, upload artifacts
- provider: releases - provider: releases