mirror of
https://github.com/status-im/nim-rocksdb.git
synced 2025-02-27 14:30:49 +00:00
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
language: c
|
|
|
|
cache: ccache
|
|
|
|
matrix:
|
|
include:
|
|
# Build and test against the master (stable) and devel branches of Nim
|
|
# Build and test using both gcc and clang
|
|
# For faster testing we don't test clang on linux, only on macOS
|
|
- os: linux
|
|
env:
|
|
- CHANNEL=stable
|
|
- CHANNEL=devel
|
|
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
|
|
env: CHANNEL=stable
|
|
compiler: clang
|
|
before_install:
|
|
- brew update
|
|
- brew install rocksdb
|
|
|
|
allow_failures:
|
|
# Ignore failures when building against the devel Nim branch
|
|
# Also ignore OSX, due to very long build time for Travis
|
|
- env: CHANNEL=devel
|
|
- os: osx
|
|
fast_finish: true
|
|
|
|
install:
|
|
- if [ $TRAVIS_OS_NAME = osx ]; then
|
|
export CHOOSENIM_NO_ANALYTICS=1;
|
|
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh;
|
|
sh init.sh -y;
|
|
export PATH=~/.nimble/bin:$PATH;
|
|
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:
|
|
- if [ $TRAVIS_OS_NAME = osx ]; then
|
|
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:
|
|
except:
|
|
- gh-pages
|