Skip to content

Commit b5243b1

Browse files
committed
CI: fix all builds
1 parent 5348387 commit b5243b1

2 files changed

Lines changed: 41 additions & 28 deletions

File tree

.travis.yml

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ matrix:
55
- os: linux
66
env: PYTHON=2.7
77
- os: linux
8-
env: PYTHON=3.5
8+
env: PYTHON=3.6
99
- os: linux
1010
env: CONDA=2.7
1111
- os: linux
12-
env: CONDA=3.6
12+
env: CONDA=3.7
1313
- os: osx
1414
env: PYTHON=2.7
1515
- os: osx
16-
env: PYTHON=3.6
16+
env: BREW=3.7
1717
- os: osx
1818
env: CONDA=2.7
1919
- os: osx
20-
env: CONDA=3.6
20+
env: CONDA=3.7
2121

2222
dist: trusty
2323

@@ -29,32 +29,43 @@ addons:
2929
- kubuntu-backports
3030
packages:
3131
- g++-4.8
32-
- python3.5
33-
- python3.5-dev
32+
- python3.6
33+
- python3.6-dev
3434
- cmake
3535

3636
before_install:
3737
- if [ "`uname`" != "Darwin" ] ; then export MOOS_CXX_FLAGS="-fPIC -Wno-long-long"; fi
3838
- if [ "`uname`" != "Darwin" ] ; then export CXX="g++-4.8"; fi
39-
- cd ..
40-
- git clone -b wOnlineCI --depth=1 https://github.com/msis/core-moos
41-
- cd core-moos
42-
- mkdir build
43-
- cd build
44-
- cmake -DENABLE_EXPORT=ON -DUSE_ASYNC_COMMS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$MOOS_CXX_FLAGS ..
45-
- cmake --build . --config Release --config -j4
46-
- sudo cmake --build . --config Release --target install
47-
- cd $TRAVIS_BUILD_DIR
39+
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
40+
- |
41+
cd ..
42+
git clone --depth=1 https://github.com/themoos/core-moos
43+
cd core-moos
44+
mkdir build
45+
cd build
46+
cmake -DENABLE_EXPORT=ON -DUSE_ASYNC_COMMS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$MOOS_CXX_FLAGS ..
47+
cmake --build . --config Release --config -j4
48+
sudo cmake --build . --config Release --target install
49+
cd $TRAVIS_BUILD_DIR
4850
- |
49-
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
5051
if [ -n "$PYTHON" ]; then
51-
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "${PYTHON:0:1}" = "3" ]; then
52-
brew update; brew install python3;
53-
fi
54-
pip install --user --upgrade pip virtualenv
55-
virtualenv -p python$PYTHON venv
56-
source venv/bin/activate
57-
elif [ -n "$CONDA" ]; then
52+
export CI_PY=python$PYTHON
53+
54+
# this is required because ubuntu's python/pip is very broken
55+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $CI_PY
56+
57+
$CI_PY -m pip install --user --upgrade virtualenv
58+
$CI_PY -m virtualenv -p python$PYTHON venv
59+
fi
60+
- |
61+
if [ -n "$BREW" ]; then
62+
brew update; brew install python; brew upgrade python
63+
64+
$(brew --prefix python)/bin/python$BREW -m pip install --user --upgrade virtualenv
65+
$(brew --prefix python)/bin/python$BREW -m virtualenv venv
66+
fi
67+
- |
68+
if [ -n "$CONDA" ]; then
5869
if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi
5970
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda${CONDA:0:1}-latest-$OS.sh
6071
bash miniconda.sh -b -p $HOME/miniconda
@@ -63,19 +74,22 @@ before_install:
6374
conda config --add channels conda-forge
6475
conda update -q conda
6576
conda install -q conda-build
66-
conda create -q -n test-environment python=$CONDA
67-
source activate test-environment
77+
conda create -q -n ci-build python=$CONDA
6878
fi
6979
7080
install:
7181
- |
72-
if [ -n "$PYTHON" ]; then
82+
if [ -n "$PYTHON" ] || [ -n "$BREW" ]; then
83+
source venv/bin/activate
84+
python --version && which python
7385
python setup.py sdist
7486
pip install --verbose dist/*.tar.gz
7587
elif [ -n "$CONDA" ]; then
88+
conda activate ci-build
7689
conda build conda.recipe
7790
conda install --use-local pymoos
7891
fi
7992
8093
script:
94+
- python --version && which python
8195
- python tests/test.py

conda.recipe/meta.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ build:
1111
- CXX
1212

1313
source:
14-
git_url: ../
14+
path: ../
1515

1616
requirements:
1717
build:
1818
- python
1919
- setuptools
20-
- pybind11
2120
- cmake
2221

2322
run:

0 commit comments

Comments
 (0)