forked from NeuralNetworkVerification/Marabou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
103 lines (92 loc) · 3.5 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
language: cpp
cache:
directories:
- tools/boost_1_68_0
- $HOME/.pip-cache
- /c/Python3
before_install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then PY_CMD=/c/Python3/python ; else PY_CMD=python3 ; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'" ; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'" ; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'" ; fi
addons:
apt:
packages:
- python3
- python3-pip
- python3-setuptools
install:
- if [ "$TRAVIS_COMPILER" = "gcc" ]; then
wget https://github.com/linux-test-project/lcov/archive/v1.13.zip;
unzip v1.13.zip;
export PATH=$PATH:`pwd`/lcov-1.13/bin;
fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then if [[ ! -d "C:\Python3" || ! -f "C:\Python3\python" ]]; then choco install python3 --version=3.5.4 --params "/InstallDir:C:\Python3"; fi fi
- $PY_CMD -m pip install --user --upgrade pip
- $PY_CMD -m pip install --user --upgrade setuptools
- $PY_CMD -m pip install --user wheel
- $PY_CMD -m pip install --user -r maraboupy/test_requirements.txt --cache-dir $HOME/.pip-cache --progress-bar off
matrix:
include:
- os: linux
dist: xenial
compiler: gcc
script:
- mkdir -p build
- cd build
- cmake .. -DRUN_UNIT_TEST=ON -DPYTHON_EXECUTABLE=$(which $PY_CMD) -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON
- cmake --build . -j 2
- ctest -L system -j 2
- ctest -L regress[0-1] -j 2
- cd ..
- $PY_CMD -m pytest --cov=maraboupy maraboupy/test
- os: linux
dist: xenial
compiler: clang
script:
- mkdir - p build
- cd build
- cmake .. -DRUN_UNIT_TEST=ON -DPYTHON_EXECUTABLE=$(which $PY_CMD)
- cmake --build . -j 2
- ctest -L system -j 2
- ctest -L regress0 -j 2
- cd ..
- $PY_CMD -m pytest maraboupy/test
- os: windows
script:
- mkdir -p build
- cd build
- cmake .. -DRUN_UNIT_TEST=ON -DPYTHON_EXECUTABLE=$(which $PY_CMD) -G"Visual Studio 15 2017 Win64"
- cmake --build . --config Release
- ctest -L system -j 2
- ctest -L regress0 -j 2 # does not work ...
- cd ..
- cp maraboupy/Release/* maraboupy
- $PY_CMD -m pytest maraboupy/test
after_success:
- if [ "$TRAVIS_COMPILER" = "gcc" ]; then
codecov;
lcov --capture --directory . --output-file coverage.info;
lcov --remove coverage.info '/usr/*' '*/tools/*' '*.cc' '*/tests/*' '*Test_*.h' --output-file coverage.info;
lcov --list coverage.info;
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports";
fi
before_deploy:
- if [ "$TRAVIS_COMPILER" = "gcc" ]; then
pip install --user -r maraboupy/docs/requirements.txt --progress-bar off;
export PYTHONPATH=$PYTHONPATH:`pwd`;
make -C maraboupy/docs html;
touch maraboupy/docs/_build/html/.nojekyll;
fi
deploy:
provider: pages
skip_cleanup: true
github_token: "$GITHUB_PAGES_DEPLOY_TOKEN"
local_dir: maraboupy/docs/_build/html
on:
branch: master
condition: $TRAVIS_COMPILER = gcc
notifications:
email:
on_success: change
on_failure: always