2019-11-26 17:05:49 +01:00
|
|
|
language: go
|
2018-08-21 10:30:35 -06:00
|
|
|
|
2019-10-28 21:08:13 +01:00
|
|
|
dist: bionic
|
|
|
|
|
2018-08-31 13:42:06 -06:00
|
|
|
# https://docs.travis-ci.com/user/caching/
|
2018-08-21 14:12:23 -06:00
|
|
|
cache:
|
|
|
|
directories:
|
2019-06-16 20:18:46 +02:00
|
|
|
- rocksdbCache
|
2019-08-28 16:19:08 +02:00
|
|
|
- vendor/nimbus-build-system/vendor/Nim/bin
|
2018-08-21 10:30:35 -06:00
|
|
|
|
2019-02-15 23:37:10 +01:00
|
|
|
git:
|
2019-02-16 00:56:13 +01:00
|
|
|
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
|
|
|
|
depth: 10
|
2019-06-12 15:19:14 +02:00
|
|
|
# disable LFS file downloading during regular cloning
|
|
|
|
lfs_skip_smudge: true
|
2019-02-15 23:37:10 +01:00
|
|
|
|
2019-11-26 17:05:49 +01:00
|
|
|
go:
|
|
|
|
- "1.12.x"
|
|
|
|
|
2018-09-04 21:01:33 -06:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2019-10-16 15:34:17 +02:00
|
|
|
arch: amd64
|
2018-09-04 21:01:33 -06:00
|
|
|
sudo: required
|
2019-10-27 21:04:12 +01:00
|
|
|
env:
|
|
|
|
- NPROC=2
|
2018-09-04 21:01:33 -06:00
|
|
|
before_install:
|
2019-06-16 20:18:46 +02:00
|
|
|
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
2019-11-06 12:58:56 +01:00
|
|
|
- sudo apt-get -q update
|
|
|
|
- sudo apt-get install -y librocksdb-dev
|
2019-10-16 15:34:17 +02:00
|
|
|
- os: linux
|
|
|
|
arch: arm64
|
|
|
|
sudo: required
|
2019-10-27 21:04:12 +01:00
|
|
|
env:
|
|
|
|
- NPROC=6 # Worth trying more than 2 parallel jobs: https://travis-ci.community/t/no-cache-support-on-arm64/5416/8
|
|
|
|
# (also used to get a different cache key than the amd64 one)
|
2019-10-16 15:34:17 +02:00
|
|
|
before_install:
|
|
|
|
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
2019-10-28 21:08:13 +01:00
|
|
|
- sudo apt-get -q update
|
2019-11-06 12:58:56 +01:00
|
|
|
- sudo apt-get install -y libpcre3-dev librocksdb-dev
|
2018-09-04 21:01:33 -06:00
|
|
|
- os: osx
|
2019-10-27 21:04:12 +01:00
|
|
|
env:
|
|
|
|
- NPROC=2
|
2018-09-04 21:01:33 -06:00
|
|
|
before_install:
|
2019-06-16 20:18:46 +02:00
|
|
|
- launchctl setenv LIBRARY_PATH /usr/local/lib # for RocksDB
|
2019-11-06 12:58:56 +01:00
|
|
|
# build our own rocksdb to test with a fixed version that we think works
|
|
|
|
- vendor/nimbus-build-system/scripts/build_rocksdb.sh rocksdbCache
|
2019-08-14 20:43:02 +02:00
|
|
|
|
2018-08-21 13:13:35 -06:00
|
|
|
script:
|
2019-02-15 23:37:10 +01:00
|
|
|
- set -e # fail fast
|
2019-11-22 17:17:24 +01:00
|
|
|
# Building Nim-1.0.4 takes up to 10 minutes on Travis - the time limit after which jobs are cancelled for having no output
|
|
|
|
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update # to allow a newer Nim version to be detected
|
2019-10-27 21:04:12 +01:00
|
|
|
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}"
|
2019-08-21 00:03:15 +02:00
|
|
|
- build/nimbus --help
|
2020-02-09 17:31:37 +01:00
|
|
|
# "-static" option will not work for osx unless static system libraries are provided
|
2019-11-28 12:17:04 +01:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
2020-05-07 17:32:44 +02:00
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" test test-reproducibility wrappers;
|
2019-11-28 12:17:04 +01:00
|
|
|
else
|
2020-05-07 17:32:44 +02:00
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" test test-reproducibility wrappers wrappers-static;
|
2019-11-28 12:17:04 +01:00
|
|
|
fi
|