41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
language: c # or other C/C++ variants
|
|
|
|
# https://docs.travis-ci.com/user/caching/
|
|
cache:
|
|
directories:
|
|
- nim
|
|
- rocksdb
|
|
|
|
install:
|
|
# build nim from our own branch, to avoid downtime due to nim regressions
|
|
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
|
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } || { rm -rf nim ; mkdir -p nim; git clone https://github.com/status-im/nim.git nim/$NIMVER; cd nim/$NIMVER; sh build_all.sh; cd ../.. ; }"
|
|
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
|
|
|
|
# build our own rocksdb to test with a fixed version that we think works
|
|
- "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
|
|
- "[ -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
|
|
- cd ../..
|
|
|
|
script:
|
|
- nimble install -dy && nimble test
|
|
|
|
matrix:
|
|
# allow_failures:
|
|
# - os: osx
|
|
|
|
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)
|