-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extract script from .travis.yml + generally improve readability #23
Changes from 5 commits
b0b0ac8
89f8e38
dc4a6e8
c3f320a
26efb9c
270ce18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## travis build scripts | ||
|
||
The `.travis` directory contains scripts for each build step in each build stage. | ||
Currently the travis build defines two stages `lint` and `test`. Each stage has | ||
it's own [lifecycle](https://docs.travis-ci.com/user/customizing-the-build/#the-build-lifecycle). | ||
Every script in here is named and numbered according to which stage and lifecycle | ||
step it belongs to. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
./contrib/devtools/git-subtree-check.sh src/crypto/ctaes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. out of curiosity, is there a reason to start each There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kostyantyn errrm no not really. I wanted to insert the shebang and copyright headers there :-X ...let me quickly add these... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
./contrib/devtools/git-subtree-check.sh src/secp256k1 | ||
./contrib/devtools/git-subtree-check.sh src/univalue | ||
./contrib/devtools/git-subtree-check.sh src/leveldb | ||
./contrib/devtools/check-doc.py | ||
./contrib/devtools/check-rpc-mappings.py . | ||
./contrib/devtools/lint-all.sh | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g") | ||
export PATH | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
|
||
if [ -n "$DPKG_ADD_ARCH" ]; then | ||
sudo dpkg --add-architecture "$DPKG_ADD_ARCH" | ||
fi | ||
|
||
if [ -n "$PACKAGES" ]; then | ||
travis_retry sudo apt-get update | ||
fi | ||
|
||
if [ -n "$PACKAGES" ]; then | ||
travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
unset CC | ||
unset CXX | ||
|
||
mkdir -p depends/SDKs depends/sdk-sources | ||
|
||
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 | ||
|
||
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 | ||
|
||
if [ -z "$NO_DEPENDS" ]; then | ||
make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS | ||
fi | ||
|
||
# Start xvfb if needed, as documented at https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI | ||
if [ "$NEED_XVFB" = 1 ]; then | ||
export DISPLAY=:99.0; /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac | ||
fi | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
|
||
TRAVIS_COMMIT_LOG=$(git log --format=fuller -1) | ||
export TRAVIS_COMMIT_LOG | ||
|
||
if [ -n "$USE_SHELL" ]; then | ||
export CONFIG_SHELL="$USE_SHELL" | ||
fi | ||
|
||
OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST | ||
UNITE_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib" | ||
|
||
if [ -z "$NO_DEPENDS" ]; then | ||
depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE | ||
fi | ||
|
||
test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh | ||
|
||
mkdir build && cd build | ||
|
||
../configure --cache-file=config.cache $UNITE_CONFIG_ALL $UNITE_CONFIG || ( cat config.log && false) | ||
|
||
make distdir VERSION=$HOST | ||
|
||
cd unite-$HOST | ||
|
||
./configure --cache-file=../config.cache $UNITE_CONFIG_ALL $UNITE_CONFIG || ( cat config.log && false) | ||
|
||
make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false ) | ||
|
||
export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib | ||
|
||
if [ "$RUN_TESTS" = "true" ]; then | ||
travis_wait 30 make $MAKEJOBS check VERBOSE=1 | ||
fi | ||
|
||
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then | ||
extended="--extended --exclude feature_pruning,feature_dbcrash" | ||
fi | ||
|
||
if [ "$RUN_TESTS" = "true" ]; then | ||
test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet ${extended} | ||
fi | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍