Skip to content

Commit fe6dde2

Browse files
committed
Use two python versions in TravisCI
In TravisCI `python:` command is not supported with `language: cpp`. Switch to pyenv as an alternative. Python 3.7 is not supported on Ubuntu Trusty, so switch to Xenial.
1 parent 6ec3acc commit fe6dde2

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.travis.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
sudo: false
22
language: cpp
3-
dist: trusty
4-
python:
5-
- "2.7"
6-
- "3.7"
3+
dist: xenial
74
compiler:
85
- clang
96
- gcc
107
os:
118
- osx
129
- linux
10+
env:
11+
- PYTHON=2.7
12+
- PYTHON=3.7
13+
matrix:
14+
exclude:
15+
- os: linux
16+
compiler: clang
17+
- os: osx
18+
compiler: gcc
1319
addons:
1420
apt:
1521
packages:
@@ -20,12 +26,12 @@ addons:
2026
- g++
2127
- clang
2228
install:
23-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install md5sha1sum; fi
29+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install md5sha1sum && pyenv install -s 3.7-dev; fi
2430
#- source devtools/travis-ci/install_miniconda.sh
2531
#- conda config --add channels omnia
2632
#- conda config --add channels conda-forge # hightest priority
2733
script:
28-
- pyenv global 3.6
34+
- pyenv global `pyenv versions | grep "^ *$PYTHON" | head -n1`
2935
- mkdir build && cd build
30-
- cmake ..
31-
- make .
36+
- cmake -DPYTHON_EXECUTABLE:FILEPATH=`pyenv which python$PYTHON` ..
37+
- make

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def build_extension(self, ext):
5858

5959

6060
def gitVersionString():
61-
hard_version="2018.12.11"
61+
hard_version="2018.12.12"
6262
try:
6363
out = subprocess.check_output(['git', 'show', '-s', '--format=%cd', '--date=short'])
6464
out = out.decode().replace('-','.').strip()

0 commit comments

Comments
 (0)