language: c # or other C/C++ variants # https://docs.travis-ci.com/user/caching/ cache: directories: - rocksdb git: # when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X" depth: 10 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) install: # 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 -j${NPROC} shared_lib && sudo make install-shared - cd ../.. script: - set -e # fail fast - make -j${NPROC} V=0 - ./build/nimbus --help - make -j${NPROC} V=0 NIMFLAGS="-d:release" test - make -j${NPROC} V=0 test-reproducibility - make -C vendor/nim-beacon-chain -j${NPROC} V=0 test