2018-09-02 15:41:09 +00:00
|
|
|
language: c # or other C/C++ variants
|
2018-04-10 20:26:43 +00:00
|
|
|
|
2018-09-02 15:41:09 +00:00
|
|
|
sudo: false
|
2018-04-10 20:26:43 +00:00
|
|
|
|
2018-09-02 15:41:09 +00:00
|
|
|
# https://docs.travis-ci.com/user/caching/
|
2018-09-05 04:24:14 +00:00
|
|
|
#
|
|
|
|
# Caching the whole nim folder is better than relying on ccache - this way, we
|
|
|
|
# skip the expensive bootstrap process and linking
|
2018-09-02 15:41:09 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- nim
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
|
|
|
install:
|
2018-09-05 04:24:14 +00:00
|
|
|
# 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-09-02 15:41:09 +00:00
|
|
|
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
2018-09-05 04:24:14 +00:00
|
|
|
|
|
|
|
# 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 ../.. ;
|
|
|
|
}"
|
2018-09-02 15:41:09 +00:00
|
|
|
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
|
|
|
|
|
|
|
|
script:
|
2018-09-05 04:24:14 +00:00
|
|
|
- nimble install -y
|
|
|
|
- nimble test
|