mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
ci: fix checking CI_GITHUB_API_KEY, refactoring (#5496)
* 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. * ci: split build jobs into separate shell scripts
This commit is contained in:
committed by
david gauchard
parent
64f7147da3
commit
79553e539a
14
tests/ci/build_boards.sh
Executable file
14
tests/ci/build_boards.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# CI job which checks that boards.txt and package_esp8266com_index.template.json are up to date
|
||||
|
||||
set -ev
|
||||
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
|
||||
tools/boards.txt.py --boardsgen --ldgen --packagegen --docgen
|
||||
|
||||
git diff --exit-code -- boards.txt \
|
||||
doc/boards.rst \
|
||||
tools/sdk/ld/
|
||||
git diff --exit-code -w -- package/package_esp8266com_index.template.json
|
9
tests/ci/build_docs.sh
Executable file
9
tests/ci/build_docs.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# CI job to run the documentation build
|
||||
|
||||
set -ev
|
||||
|
||||
cd $TRAVIS_BUILD_DIR/doc
|
||||
|
||||
SPHINXOPTS="-W" make html
|
16
tests/ci/build_package.sh
Executable file
16
tests/ci/build_package.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# CI job which builds the boards manager package
|
||||
|
||||
set -ev
|
||||
|
||||
export PKG_URL=https://github.com/esp8266/Arduino/releases/download/$TRAVIS_TAG/esp8266-$TRAVIS_TAG.zip
|
||||
export DOC_URL=https://arduino-esp8266.readthedocs.io/en/$TRAVIS_TAG/
|
||||
|
||||
if [ -z "$CI_GITHUB_API_KEY" ]; then
|
||||
echo "Github API key not set. Skip building the package."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd $TRAVIS_BUILD_DIR/package
|
||||
./build_boards_manager_package.sh
|
10
tests/ci/host_test.sh
Executable file
10
tests/ci/host_test.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# CI job for running tests on the host
|
||||
|
||||
set -ev
|
||||
|
||||
cd $TRAVIS_BUILD_DIR/tests/host
|
||||
|
||||
make CI
|
||||
make clean-objects
|
16
tests/ci/install_astyle.sh
Executable file
16
tests/ci/install_astyle.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $HOME/astyle directory is cached on Travis.
|
||||
# If cached build is not present, download astyle and build it.
|
||||
# Install built astyle binary into the home directory.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f $HOME/astyle/build/gcc/bin/astyle ]; then
|
||||
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
|
||||
make -C $HOME/astyle/build/gcc
|
||||
fi
|
||||
|
||||
make -C $HOME/astyle/build/gcc prefix=$HOME install
|
16
tests/ci/style_check.sh
Executable file
16
tests/ci/style_check.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# CI job for checking examples style
|
||||
|
||||
set -ev
|
||||
|
||||
find $TRAVIS_BUILD_DIR/libraries -name '*.ino' -exec \
|
||||
astyle \
|
||||
--suffix=none \
|
||||
--options=$TRAVIS_BUILD_DIR/tests/examples_style.conf {} \;
|
||||
|
||||
# Revert changes which astyle might have done to the submodules,
|
||||
# as we don't want to fail the build because of the 3rd party libraries
|
||||
git submodule foreach --recursive git reset --hard
|
||||
|
||||
git diff --exit-code -- $TRAVIS_BUILD_DIR/libraries
|
Reference in New Issue
Block a user