Travis CI: use the Makefile

This commit is contained in:
Ștefan Talpalaru 2019-02-15 23:37:10 +01:00 committed by zah
parent c07006030d
commit ba0c25cb1c
1 changed files with 9 additions and 29 deletions

View File

@ -1,14 +1,14 @@
language: c # or other C/C++ variants language: c # or other C/C++ variants
# https://docs.travis-ci.com/user/caching/ # https://docs.travis-ci.com/user/caching/
#
# Caching the whole nim folder is better than relying on ccache - this way, we
# skip the expensive bootstrap process and linking
cache: cache:
directories: directories:
- nim
- rocksdb - rocksdb
git:
depth: 1
submodules_depth: 1
matrix: matrix:
include: include:
- os: linux - os: linux
@ -22,38 +22,18 @@ matrix:
- export NPROC=$(sysctl -n hw.ncpu) - export NPROC=$(sysctl -n hw.ncpu)
install: install:
# 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
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
# 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 ../.. ;
}"
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
# build our own rocksdb to test with a fixed version that we think works # build our own rocksdb to test with a fixed version that we think works
- "export ROCKSDBVER=5.14.2" - "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 ..; }" - "[ -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 - cd rocksdb/rocksdb-$ROCKSDBVER
- "[ -f util/build_version.cc ] || { make util/build_version.cc ; }" # use cached version if possible - "[ -f util/build_version.cc ] || { make util/build_version.cc ; }" # use cached version if possible
- export NO_UPDATE_BUILD_VERSION=1 - export NO_UPDATE_BUILD_VERSION=1
- make shared_lib -j$NPROC && sudo make install-shared - make -j${NPROC} shared_lib && sudo make install-shared
- cd ../.. - cd ../..
script: script:
# fail fast - set -e # fail fast
- set -e - make -j${NPROC} nimbus
- nimble install -y --depsOnly
- nimble nimbus
- ./build/nimbus --help - ./build/nimbus --help
- nimble test - make -j${NPROC} test