You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #13863: travis: move script sections to files in .travis/ subject to shellcheck
4143269 use export LC_ALL=C.UTF-8 (Julian Fleischer)
728c82d make script exit if a command fails (Julian Fleischer)
506890b move remaining travis build steps into individual files (Julian Fleischer)
272306e number .travis/ script according to build lifecycle and add README to explain (Julian Fleischer)
519e273 move lint stage up to resemble travis build ui (Julian Fleischer)
86d34f0 abort script in END_FOLD on non-zero exit code (Julian Fleischer)
4f2f88c move script sections info individual files and comply with shellcheck (Julian Fleischer)
Pull request description:
This PR is extracted from bitcoin/bitcoin#13816 to make that one easier to review. It follows on bitcoin/bitcoin#13849 and bitcoin/bitcoin#13851
In here the shell script parts from `travis.yml` are extracted into `.travis/before_install.sh`, `.travis/install.sh`, `.travis/before_script.sh`, `.travis/script.sh`, and `.travis/lint.sh`.
This has the benefit that `test/lint/lint-shell.sh` will also shellcheck these parts. Also it makes the individual script parts more readable.
Tree-SHA512: c497e1687ceb1c1d795de177d3fc35af908bc8e3f781a871afabdecf031e581d4db229290627249e35ef7c09952bc34884e4734ea91d40f57b4a9efb85bba2e3
- set -o errexit; source .travis/test_04_install.sh
44
34
before_script:
45
-
- DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file
46
-
- mkdir -p depends/SDKs depends/sdk-sources
47
-
- if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
48
-
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
49
-
- if [[ $HOST = *-mingw32 ]]; then DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\); fi
50
-
- if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS; fi
35
+
- set -o errexit; source .travis/test_05_before_script.sh
- if [ "$RUN_UNIT_TESTS" = "true" ]; then BEGIN_FOLD unit-tests; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; END_FOLD; fi
64
-
- if [ "$RUN_BENCH" = "true" ]; then BEGIN_FOLD bench; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001 ; END_FOLD; fi
65
-
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
66
-
- if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
37
+
- set -o errexit; source .travis/test_06_script.sh
67
38
after_script:
68
-
- echo $TRAVIS_COMMIT_RANGE
69
-
- echo $TRAVIS_COMMIT_LOG
39
+
- echo $TRAVIS_COMMIT_RANGE
40
+
- echo $TRAVIS_COMMIT_LOG
70
41
jobs:
71
42
include:
43
+
# lint stage
44
+
- stage: lint
45
+
env:
46
+
sudo: false
47
+
cache: false
48
+
language: python
49
+
python: '3.6'
50
+
install:
51
+
- set -o errexit; source .travis/lint_04_install.sh
52
+
before_script:
53
+
- set -o errexit; source .travis/lint_05_before_script.sh
54
+
script:
55
+
- set -o errexit; source .travis/lint_06_script.sh
0 commit comments