53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
language: c # or other C/C++ variants
|
|
|
|
# xenial is required for GO 1.11.x
|
|
# dist: xenial
|
|
sudo: false
|
|
|
|
# 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:
|
|
directories:
|
|
- nim
|
|
- $HOME/go/src/gx
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
dist: trusty
|
|
go: 1.11.x
|
|
- os: osx
|
|
go: 1.11.x
|
|
before_install:
|
|
- export GOPATH=$HOME/go
|
|
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:$GOPATH/bin:$PATH
|
|
- go version
|
|
- go get -v github.com/libp2p/go-libp2p-daemon
|
|
- cd $GOPATH/src/github.com/libp2p/go-libp2p-daemon
|
|
- make
|
|
- cd $HOME/build/status-im/nim-libp2p
|
|
|
|
script:
|
|
- nimble install -y
|
|
- nimble test
|