Skip to content

Commit 75aeba9

Browse files
committed
ci: update travis to also Python 3 correctly
1 parent 1a53552 commit 75aeba9

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

.travis.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,44 @@ env:
2020
jobs:
2121
include:
2222
- dist: bionic
23-
env: BUILDTYPE=Release
23+
env:
24+
- BUILDTYPE=Release
25+
- TRAVIS_PYTHON_VERSION=27
2426
python: 2.7
2527
- dist: bionic
26-
env: BUILDTYPE=Release
28+
env:
29+
- BUILDTYPE=Release
30+
- TRAVIS_PYTHON_VERSION=36
2731
python: 3.6
2832
- dist: bionic
29-
env: BUILDTYPE=Debug
33+
env:
34+
- BUILDTYPE=Debug
35+
- TRAVIS_PYTHON_VERSION=27
3036
python: 2.7
3137
- dist: bionic
32-
env: BUILDTYPE=Debug
38+
env:
39+
- BUILDTYPE=Debug
40+
- TRAVIS_PYTHON_VERSION=36
3341
python: 3.6
3442
- dist: xenial
35-
env: BUILDTYPE=Release
43+
env:
44+
- BUILDTYPE=Release
45+
- TRAVIS_PYTHON_VERSION=27
3646
python: 2.7
3747
- dist: xenial
38-
env: BUILDTYPE=Release
48+
env:
49+
- BUILDTYPE=Release
50+
- TRAVIS_PYTHON_VERSION=35
3951
python: 3.5
4052
- dist: trusty
41-
env: BUILDTYPE=Release
53+
env:
54+
- BUILDTYPE=Release
55+
- TRAVIS_PYTHON_VERSION=27
4256
python: 2.7
4357
- dist: trusty
44-
env: BUILDTYPE=Release
58+
env:
59+
- BUILDTYPE=Release
60+
- TRAVIS_PYTHON_VERSION=34
4561
python: 3.4
4662

4763
notifications:

travis_custom/custom_build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
set -e
33

44
# Setup environment variables.
5-
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_UNIT_TESTS=\"ON\" -DCMAKE_CXX_FLAGS=-DBOOST_SYSTEM_NO_DEPRECATED -DPYTHON_EXECUTABLE=$(which python)"
5+
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_UNIT_TESTS=\"ON\" -DCMAKE_CXX_FLAGS=-DBOOST_SYSTEM_NO_DEPRECATED"
66
if [[ ";${DO_INSTALL_DOC_EXCEPT_ON_BRANCH};" == *";${CI_BRANCH};"* ]]; then
77
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DINSTALL_DOCUMENTATION=\"OFF\""
88
else
99
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DINSTALL_DOCUMENTATION=\"ON\""
1010
fi
1111

12+
if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then
13+
export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DPYTHON_EXECUTABLE=$(which python3)"
14+
fi
15+
1216
# Setup environment variables.
1317
. ./.travis/run ../.travis/build
1418

0 commit comments

Comments
 (0)