travis: use cached nim instead of docker

This commit is contained in:
Jacek Sieka 2018-09-02 19:57:26 -06:00
parent 41dccda0d7
commit 24fa7028a6
No known key found for this signature in database
GPG Key ID: 6299FEB3EB6FA465
1 changed files with 21 additions and 7 deletions

View File

@ -1,8 +1,22 @@
sudo: required
services:
- docker
before_install:
- docker pull yglukhov/nim-base
language: c # or other C/C++ variants
sudo: false
# https://docs.travis-ci.com/user/caching/
cache:
directories:
- nim
os:
- linux
- osx
install:
# build nim from our own branch, to avoid downtime due to nim regressions
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } || { rm -rf nim ; mkdir -p nim; git clone https://github.com/status-im/nim.git nim/$NIMVER; cd nim/$NIMVER; sh build_all.sh; cd ../.. ; }"
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
script:
- docker run -v "$(pwd):/project" -w /project yglukhov/nim-base nim --version
- docker run -v "$(pwd):/project" -w /project yglukhov/nim-base nimble test
- nimble install -dy && nimble test