2018-08-21 16:30:35 +00:00
|
|
|
language: c # or other C/C++ variants
|
|
|
|
|
2018-08-31 19:42:06 +00:00
|
|
|
# https://docs.travis-ci.com/user/caching/
|
2018-09-05 03:01:33 +00:00
|
|
|
#
|
|
|
|
# Caching the whole nim folder is better than relying on ccache - this way, we
|
|
|
|
# skip the expensive bootstrap process and linking
|
2018-08-21 20:12:23 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
2018-08-26 15:22:29 +00:00
|
|
|
- nim
|
2018-08-31 19:42:06 +00:00
|
|
|
- rocksdb
|
2018-08-21 16:30:35 +00:00
|
|
|
|
2018-09-05 03:01:33 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
before_install:
|
|
|
|
- export INSTALL_PATH=/usr
|
|
|
|
- export NPROC=$(nproc)
|
|
|
|
- os: osx
|
|
|
|
before_install:
|
|
|
|
- export INSTALL_PATH=$HOME # included in DYLD_FALLBACK_LIBRARY_PATH
|
|
|
|
- export NPROC=$(sysctl -n hw.ncpu)
|
|
|
|
|
2018-08-21 19:13:35 +00:00
|
|
|
install:
|
2018-09-05 03:01:33 +00:00
|
|
|
# build nim from our own branch - this to avoid the day-to-day churn and
|
|
|
|
# regressions of the fast-paced Nim development while maintaining the
|
|
|
|
# flexibility to apply patches
|
|
|
|
#
|
|
|
|
# check version of remote branch
|
2018-08-31 19:42:06 +00:00
|
|
|
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
2018-09-05 03:01:33 +00:00
|
|
|
|
|
|
|
# after building nim, wipe csources to save on cache space
|
|
|
|
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } ||
|
|
|
|
{ rm -rf nim ;
|
|
|
|
mkdir -p nim ;
|
|
|
|
git clone --depth=1 https://github.com/status-im/nim.git nim/$NIMVER ;
|
|
|
|
cd nim/$NIMVER ;
|
|
|
|
sh build_all.sh ;
|
|
|
|
rm -rf csources ;
|
|
|
|
cd ../.. ;
|
|
|
|
}"
|
2018-08-31 19:42:06 +00:00
|
|
|
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
|
|
|
|
|
2018-08-30 19:56:09 +00:00
|
|
|
# build our own rocksdb to test with a fixed version that we think works
|
2018-08-31 19:42:06 +00:00
|
|
|
- "export ROCKSDBVER=5.14.2"
|
|
|
|
- "[ -f rocksdb/rocksdb-$ROCKSDBVER/Makefile ] || { rm -rf rocksdb ; mkdir -p rocksdb; cd rocksdb; wget https://github.com/facebook/rocksdb/archive/v$ROCKSDBVER.tar.gz && tar xvf v$ROCKSDBVER.tar.gz; cd ..; }"
|
|
|
|
- cd rocksdb/rocksdb-$ROCKSDBVER
|
2018-08-30 19:56:09 +00:00
|
|
|
- "[ -f util/build_version.cc ] || { make util/build_version.cc ; }" # use cached version if possible
|
|
|
|
- export NO_UPDATE_BUILD_VERSION=1
|
|
|
|
- make shared_lib -j$NPROC && sudo make install-shared
|
2018-08-31 19:42:06 +00:00
|
|
|
- cd ../..
|
2018-08-21 19:13:35 +00:00
|
|
|
|
|
|
|
script:
|
2018-12-24 16:03:27 +00:00
|
|
|
# fail fast
|
|
|
|
- set -e
|
|
|
|
- nimble install -y --depsOnly
|
|
|
|
- nimble nimbus
|
|
|
|
- ./build/nimbus --help
|
2018-09-05 03:01:33 +00:00
|
|
|
- nimble test
|