forked from DOI-USGS/ale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (54 loc) · 1.4 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
language: cpp
sudo: false
branches:
only:
- master
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CXX=g++-7 && CC=gcc-7"
- os: osx
osx_image: xcode9.4
env:
- MATRIX_EVAL="CXX=clang++ && CC=clang"
before_install:
- echo "$TRAVIS_PULL_REQUEST"
- eval "${MATRIX_EVAL}"
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
pip install --user cpp-coveralls;
fi
install:
# Install a supported cmake version (>= 3.10)
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes
- conda env create -f environment.yml -n ale
- source activate ale
- conda install pytest
script:
- PYTHONPATH=. pytest tests/pytests
- python setup.py install # install to use python lib in c code
- mkdir -p build
- cd build
- cmake -DCOVERAGE=ON ..
- cmake --build .
- ctest -VV
after_success:
- |
if [ "$TRAVIS_OS_NAME" == linux ]; then
coveralls --root $(dirname $PWD) -i src/ --verbose;
fi