travis: avoid docker, use cache

This commit is contained in:
Jacek Sieka 2018-08-31 17:08:03 -06:00
parent c84b8cb143
commit 54fdd0c047
No known key found for this signature in database
GPG Key ID: 6299FEB3EB6FA465
1 changed files with 18 additions and 31 deletions

View File

@ -1,33 +1,20 @@
matrix: language: c # or other C/C++ variants
include:
- os: linux
sudo: required
services:
- docker
before_install:
- docker pull statusteam/nim-base
script:
- docker run statusteam/nim-base nim --version
- docker run -v "$(pwd):/project" -w /project statusteam/nim-base sh -c "nimble install -dy && nimble test"
- os: osx # https://docs.travis-ci.com/user/caching/
before_install: cache:
- git clone https://github.com/nim-lang/nim.git directories:
- cd nim - nim
- git remote add statusim https://github.com/status-im/nim.git
- git fetch statusim os:
- git config --global user.email "you@example.com" - linux
- git config --global user.name "Your Name" - osx
- for b in $(git branch -a --list 'statusim/status-autopatch-*'); do git merge $b; done
- git clone --depth 1 https://github.com/nim-lang/csources.git install:
- cd csources # build nim from our own branch, to avoid downtime due to nim regressions
- sh build.sh - "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
- cd .. - "{ [ -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/bin:$PATH - "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
- nim c koch
- ./koch boot -d:release script:
- ./koch nimble - nimble install -dy && nimble test
- cd ..
script:
- nimble install -dy && nimble test