2018-11-19 02:04:47 +00:00
|
|
|
language: c # or other C/C++ variants
|
|
|
|
|
2018-11-19 02:39:34 +00:00
|
|
|
# xenial is required for GO 1.11.x
|
2019-01-10 00:13:34 +00:00
|
|
|
# dist: xenial
|
2018-11-19 02:04:47 +00:00
|
|
|
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
|
2018-11-19 03:26:20 +00:00
|
|
|
- $HOME/go/src/gx
|
2018-11-19 02:04:47 +00:00
|
|
|
|
2018-11-19 03:58:52 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2019-01-10 00:13:34 +00:00
|
|
|
dist: trusty
|
|
|
|
go: 1.11.x
|
2019-01-10 00:33:14 +00:00
|
|
|
# - os: osx
|
|
|
|
# go: 1.11.x
|
|
|
|
# before_install:
|
|
|
|
# - export GOPATH=$HOME/go
|
2018-11-19 02:04:47 +00:00
|
|
|
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
|
2018-11-19 02:39:34 +00:00
|
|
|
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
2018-11-19 02:04:47 +00:00
|
|
|
|
|
|
|
# after building nim, wipe csources to save on cache space
|
2018-11-19 02:39:34 +00:00
|
|
|
- "{ [ -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-11-19 04:03:23 +00:00
|
|
|
- export PATH=$PWD/nim/$NIMVER/bin:$GOPATH/bin:$PATH
|
2019-01-09 23:37:54 +00:00
|
|
|
- go version
|
2018-11-19 02:15:45 +00:00
|
|
|
- go get -v github.com/libp2p/go-libp2p-daemon
|
2018-11-19 03:58:52 +00:00
|
|
|
- cd $GOPATH/src/github.com/libp2p/go-libp2p-daemon
|
2018-11-19 03:49:14 +00:00
|
|
|
- make
|
|
|
|
- cd $HOME/build/status-im/nim-libp2p
|
2018-11-19 02:04:47 +00:00
|
|
|
|
|
|
|
script:
|
2018-11-19 02:52:11 +00:00
|
|
|
- nimble install -y
|
2018-11-19 03:24:45 +00:00
|
|
|
- nimble test
|