lokinet/.travis.yml

76 lines
3.8 KiB
YAML
Raw Normal View History

2019-05-29 04:43:15 +00:00
sudo: required
2019-05-29 04:49:43 +00:00
dist: xenial
2019-05-29 04:43:15 +00:00
os: linux
language: minimal
cache:
directories:
- contrib/depends/built
- contrib/depends/sdk-sources
- $HOME/.ccache
env:
global:
2019-05-29 04:49:43 +00:00
- MAKEJOBS=-j2
2019-05-29 04:43:15 +00:00
- CCACHE_SIZE=100M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- CCACHE_DIR=$HOME/.ccache
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
2019-06-04 07:46:25 +00:00
- DOCKER_PACKAGES="build-essential cmake git libcap-dev bsdmainutils ninja-build curl git ca-certificates ccache"
2019-05-29 04:43:15 +00:00
matrix:
2019-05-29 07:01:37 +00:00
#- HOST=x86_64-w64-mingw32
- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF
2019-06-04 09:43:07 +00:00
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NINJA=ninja
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NINJA=ninja
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NETNS=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NETNS=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NINJA=ninja NETNS=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NINJA=ninja NETNS=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NINJA=ninja SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NINJA=ninja SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NETNS=ON SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NETNS=ON SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=OFF NINJA=ninja NETNS=ON SHARED_LIB=ON
#- HOST=x86_64-unknown-linux-gnu STATIC_LINK=ON NINJA=ninja NETNS=ON SHARED_LIB=ON
2019-05-29 07:01:37 +00:00
#- HOST=x86_64-apple-darwin11 OSX_SDK=10.12
install:
- env | grep -E '^(CCACHE_|DISPLAY|CONFIG_SHELL)' | tee /tmp/env
- if [[ $HOST = *-mingw32 ]]; then DOCKER_ADMIN="--cap-add SYS_ADMIN"; fi
- DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env ubuntu:18.04)
- DOCKER_EXEC="docker exec $DOCKER_ID"
- if [ -n "$DPKG_ADD_ARCH" ]; then $DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi
2019-05-29 06:16:24 +00:00
- travis_retry $DOCKER_EXEC apt-get update
- travis_retry $DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade software-properties-common -qq $PACKAGES $DOCKER_PACKAGES
# - travis_retry $DOCKER_EXEC add-apt-repository ppa:ubuntu-toolchain-r/test
# - travis_retry $DOCKER_EXEC apt-get update
# - travis_retry $DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq gcc-6 g++-6
2019-05-29 04:43:15 +00:00
script:
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
- if [ -z "$NO_DEPENDS" ]; then $DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi
#- $DOCKER_EXEC bash -c "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6"
2019-06-04 08:20:04 +00:00
- $DOCKER_EXEC bash -c "mkdir build && cd build && cmake .. && make $MAKEJOBS STATIC_LINK=$STATIC_LINK NINJA=$NINJA NETNS=$NETNS SHARED_LIB=$SHARED_LIB && make test"
2019-05-29 04:43:15 +00:00
after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
2019-05-29 07:01:37 +00:00
notifications:
irc:
on_success: change
on_failure: change
channels:
- "chat.freenode.net#llarp"
nick: lokinet-ci
template:
- "%{result} | %{repository}#%{build_number} (%{commit} : %{author}) | Build details : %{build_url}"