Hoping for Travis docker to work

This commit is contained in:
mratsim 2018-02-04 02:10:08 +01:00
parent 130cc07f84
commit 1af9394d71
1 changed files with 39 additions and 23 deletions

View File

@ -8,16 +8,28 @@ matrix:
# Build and test using both gcc and clang # Build and test using both gcc and clang
# For faster testing we don't test clang on linux, only on macOS # For faster testing we don't test clang on linux, only on macOS
- os: linux - os: linux
env: CHANNEL=stable env:
compiler: gcc - CHANNEL=stable
- CHANNEL=devel
- os: linux
env: CHANNEL=devel
compiler: gcc compiler: gcc
sudo: required
services:
- docker
before_install:
# RocksDB is packaged for 16.04+ only
# 16.04 on Travis requires docker
- docker pull ubuntu:16.04
addons:
apt:
packages:
- librocksdb-dev
- os: osx - os: osx
env: CHANNEL=stable env: CHANNEL=stable
compiler: clang compiler: clang
before_install:
- brew update
- brew install rocksdb
allow_failures: allow_failures:
# Ignore failures when building against the devel Nim branch # Ignore failures when building against the devel Nim branch
@ -26,27 +38,31 @@ matrix:
- os: osx - os: osx
fast_finish: true fast_finish: true
addons:
apt:
packages:
- librocksdb-dev
before_install:
# MacOS only
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install homebrew/rocksdb; fi
install: install:
- export CHOOSENIM_NO_ANALYTICS=1 - if [ $TRAVIS_OS_NAME = osx ]; then
- curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh export CHOOSENIM_NO_ANALYTICS=1;
- sh init.sh -y curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh;
- export PATH=~/.nimble/bin:$PATH sh init.sh -y;
- echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile export PATH=~/.nimble/bin:$PATH;
- choosenim $CHANNEL echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile;
choosenim $CHANNEL;
fi;
- if [ $TRAVIS_OS_NAME = linux ]; then
docker exec $(docker ps -aq) /bin/bash -c 'export CHOOSENIM_NO_ANALYTICS=1';
docker exec $(docker ps -aq) /bin/bash -c 'curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh';
docker exec $(docker ps -aq) /bin/bash -c 'sh init.sh -y';
docker exec $(docker ps -aq) /bin/bash -c 'export PATH=~/.nimble/bin:$PATH';
docker exec $(docker ps -aq) /bin/bash -c 'echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile';
docker exec $(docker ps -aq) /bin/bash -c "choosenim $CHANNEL";
fi;
script: script:
- nimble refresh - if [ $TRAVIS_OS_NAME = osx ]; then
- nimble test_c nimble refresh;
nimble test_c;
- if [ $TRAVIS_OS_NAME = linux ]; then
docker exec $(docker ps -aq) /bin/bash -c 'nimble refresh';
docker exec $(docker ps -aq) /bin/bash -c 'nimble test_c';
branches: branches:
except: except: