Skip to content

Commit fa61a49

Browse files
committed
ENH: Use recommended homebrew addon for travis.
Remove unnecessary python3 environment from osx that made configuring the test environment slower. Use "addon:" features for installing homebrew packages more efficiently. Re-organized the .travis.yml file in a standard order so that the "before-install" and "install" steps occur after the configurations of addons and matrix, and language features are set.
1 parent f8ad1ab commit fa61a49

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

.travis.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# See also
66
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
77
# to allow C++11, though we are not yet building with -std=c++11
8-
9-
before_install:
10-
- source travis.before_install.${TRAVIS_OS_NAME}.sh
11-
install:
12-
- source travis.install.${TRAVIS_OS_NAME}.sh
8+
language: cpp
9+
sudo: false
1310
addons:
11+
homebrew:
12+
packages: meson ninja
13+
update: false # do not update homebrew by default
1414
apt:
1515
sources:
1616
#- ubuntu-toolchain-r-test
@@ -20,16 +20,16 @@ addons:
2020
#- g++-4.9
2121
- clang-3.5
2222
- valgrind
23-
language: cpp
24-
script: ./travis.sh
2523
matrix:
2624
allow_failures:
2725
- os: osx
28-
matrix:
2926
include:
3027
- os: osx
3128
osx_image: xcode9.4
3229
compiler: clang
30+
addons:
31+
homebrew:
32+
packages: meson ninja
3333
#env: PYENV_ROOT=/usr/local/var/pyenv
3434
env: LIB_TYPE=static BUILD_TYPE=release HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
3535
#- LIB_TYPE=shared BUILD_TYPE=debug
@@ -39,4 +39,9 @@ matrix:
3939
env: LIB_TYPE=static BUILD_TYPE=release
4040
notifications:
4141
email: false
42-
sudo: false
42+
43+
before_install:
44+
- source ./travis.before_install.${TRAVIS_OS_NAME}.sh
45+
install:
46+
- source ./travis.install.${TRAVIS_OS_NAME}.sh
47+
script: ./travis.sh

travis.before_install.osx.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
set -vex
1+
# NOTHING TO DO HERE
2+
# set -vex
3+
24
#brew install pyenv
35
#which pyenv

travis.install.osx.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
set -vex
1+
# NOTHING TO DO HERE
2+
# set -vex
23

3-
#brew update
4-
brew upgrade python3
5-
python3 -m venv venv
6-
source venv/bin/activate
7-
8-
brew install ninja
9-
brew install meson
10-
11-
#brew install pyenv
12-
#which pyenv
4+
#python3 -m venv venv
5+
#source venv/bin/activate

travis.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ set -vex
1717

1818
env | sort
1919

20+
which python3
21+
which meson
22+
which ninja
2023
echo ${CXX}
2124
${CXX} --version
2225
python3 --version

0 commit comments

Comments
 (0)