Skip to content

Commit 0e0559f

Browse files
committed
Try fixing macOS ci
1 parent c11ebf1 commit 0e0559f

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

.travis.yml

+12-22
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ matrix:
1111
- os: osx
1212
language: generic
1313
env:
14-
- PYTHON_VERSION=3.7.8
14+
- PYTHON_VERSION=3.7.9
1515

1616
- os: osx
1717
language: generic
1818
env:
19-
- PYTHON_VERSION=2.7.15
19+
- PYTHON_VERSION=2.7.18
2020

2121
- os: linux
2222
arch: arm64-graviton2
@@ -25,37 +25,27 @@ matrix:
2525
dist: focal
2626
language: generic
2727

28-
before_cache:
29-
# Cleanup to avoid the cache to grow indefinitely as new package versions are released
30-
# see https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
31-
- |
32-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
33-
brew cleanup
34-
fi
3528

3629
cache:
3730
directories:
38-
# Cache downloaded bottles
39-
- $HOME/Library/Caches/Homebrew
40-
# pyenv
41-
- $HOME/.pyenv_cache
42-
- $HOME/.pyenv/versions/3.7.8
43-
- $HOME/.pyenv/versions/2.7.15
4431
# scikit-ci-addons
4532
- $HOME/downloads
4633

4734
before_install:
4835
- |
49-
# Workaround the following error occuring because python installation is cached but gettext dependency is not
50-
# dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
51-
# Referenced from: /Users/travis/.pyenv/versions/3.7.2/bin/python
52-
# Reason: Incompatible library version: python requires version 11.0.0 or later, but libintl.8.dylib provides version 10.0.0
53-
if [[ "$TRAVIS_OS_NAME" == "osx" && "${PYTHON_VERSION}" == "3.7.8" ]]; then
54-
brew install gettext
36+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
37+
curl -fsSLo /tmp/Python.pkg "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg"
38+
sudo installer -pkg /tmp/Python.pkg -target /
39+
PYTHON_VERSION2=${PYTHON_VERSION%.*}
40+
PYTHON_VERSION1=${PYTHON_VERSION2%.*}
41+
curl -fsSLo /tmp/install_certifi.py https://github.com/joerick/cibuildwheel/raw/v1.10.0/cibuildwheel/resources/install_certifi.py
42+
sudo /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} /tmp/install_certifi.py
43+
/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} -m pip install virtualenv
44+
/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} -m virtualenv ${HOME}/.pyenv/versions/${PYTHON_VERSION}
45+
source ${HOME}/.pyenv/versions/${PYTHON_VERSION}/bin/activate
5546
fi
5647
- |
5748
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
58-
mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python
5949
python scripts/ssl-check.py
6050
python -m pip install --disable-pip-version-check --upgrade pip
6151
pip install -U scikit-ci scikit-ci-addons

0 commit comments

Comments
 (0)