-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.travis.yml
96 lines (85 loc) · 3.71 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
language: cpp
branches:
only:
- master
- dev
- travis # specifically for experimenting with travis builds
os :
- linux
sudo: required
compiler:
- gcc
- clang
jdk:
- openjdk8
- oraclejdk8
matrix:
include:
- java: openjdk8
python: "3.4"
env: TEST_PYTHON=1 BUILD_TARGET="libmonosat" JDK_VERSION="openjdk8" PYTHON_VERSION="python3.4" BUILD_ARGS="-DPYTHON=ON"
- java: openjdk8
python: "3.4"
env: TEST_PYTHON=1 BUILD_TARGET="libmonosat" JDK_VERSION="openjdk8" PYTHON_VERSION="python3.4" BUILD_ARGS="-DPYTHON=ON -DCYTHON=ON"
- java: oraclejdk8
env: TEST_PYTHON=1 TEST_JAVA=1 BUILD_TARGET="libmonosat" BUILD_ARGS="-DPYTHON=ON -DJAVA=ON" JDK_VERSION="oraclejdk8" PYTHON_VERSION="python3.4"
python: "3.4"
- java: openjdk9
python: "3.4"
env: TEST_PYTHON=1 TEST_JAVA=1 BUILD_TARGET="libmonosat" BUILD_ARGS="-DPYTHON=ON -DJAVA=ON -DGPL=OFF" JDK_VERSION="openjdk9" PYTHON_VERSION="python3.4"
os: linux
dist: trusty
compiler: clang
- java: openjdk9
python: "3.8"
os: linux
dist: bionic
compiler: clang
env: TEST_PYTHON=1 TEST_JAVA=1 BUILD_TARGET="libmonosat" BUILD_ARGS="-DPYTHON=ON -DJAVA=ON -DGPL=OFF" JDK_VERSION="openjdk9" PYTHON_VERSION="python3.8"
- java: openjdk8
python: "3.6"
env: TEST_PYTHON=1 BUILD_TARGET="monosat" JDK_VERSION="openjdk8" PYTHON_VERSION="python3.6" BUILD_ARGS="-DPYTHON=ON -DJAVA=ON -DGPL=OFF -DBUILD_STATIC=OFF"
- java: openjdk8
python: "3.4"
env: TEST_PYTHON=0 TEST_JAVA=0 BUILD_TARGET="monosat_static" BUILD_ARGS="-DPYTHON=OFF -DJAVA=OFF -DGPL=OFF -DBUILD_STATIC=ON -DBUILD_DYNAMIC=OFF"
allow_failures:
- java: openjdk8
python: "3.4"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- TEST_PYTHON=1 TEST_JAVA=1 BUILD_TARGET="libmonosat" BUILD_ARGS="-DJAVA=ON" MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" JDK_VERSION="oraclejdk9" PYTHON_VERSION="python3.4"
- java: openjdk8
python: "3.4"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- TEST_PYTHON=1 TEST_JAVA=1 BUILD_ARGS="-DJAVA=ON -DGPL=OFF" MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" JDK_VERSION="openjdk8" PYTHON_VERSION="python3.4"
before_install:
- echo "os is ${TRAVIS_OS_NAME}"
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then brew update; brew install python3 || brew outdated python3 || brew upgrade python3 || true ; fi
# see https://github.com/travis-ci/travis-ci/issues/8581
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 || sudo apt-get -qq update; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-get install -y --force-yes cmake libgmp-dev zlib1g-dev; fi
- eval "${MATRIX_EVAL}"
- echo "Selected Java ${JDK_VERSION}" || true
- jdk_switcher use ${JDK_VERSION} || true
- java -version || true
- echo "Selected Python ${PYTHON_VERSION}"
- python3 --version || true
install:
- cmake ${BUILD_ARGS} .
- make ${BUILD_TARGET}
- sudo make install
script:
- ROOT=$PWD
- if [[ "$TEST_PYTHON" -eq "1" ]]; then echo "Running python tests" && cd ${ROOT}/src/monosat/api/python/ && python3 -m unittest discover && echo "Completed python tests"; fi
- if [[ "$TEST_JAVA" -eq "1" ]]; then echo "Running java tests" && cd ${ROOT}/src/monosat/api/java/tests && javac -cp ".:${ROOT}/monosat.jar:junit-4.12.jar:hamcrest-core-1.3.jar" monosat/*.java && java -Djava.library.path=${ROOT} -cp ".:${ROOT}/monosat.jar:junit-4.12.jar:hamcrest-core-1.3.jar" org.junit.runner.JUnitCore monosat.TestSuite && echo "Completed java tests"; fi