From 0e0559f4a894b91654593dd7a32917b8bd310eda Mon Sep 17 00:00:00 2001 From: mayeut Date: Wed, 7 Apr 2021 22:23:24 +0200 Subject: [PATCH] Try fixing macOS ci --- .travis.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9d6daf54..3dcaf2e5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,12 @@ matrix: - os: osx language: generic env: - - PYTHON_VERSION=3.7.8 + - PYTHON_VERSION=3.7.9 - os: osx language: generic env: - - PYTHON_VERSION=2.7.15 + - PYTHON_VERSION=2.7.18 - os: linux arch: arm64-graviton2 @@ -25,37 +25,27 @@ matrix: dist: focal language: generic -before_cache: - # Cleanup to avoid the cache to grow indefinitely as new package versions are released - # see https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci - - | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - brew cleanup - fi cache: directories: - # Cache downloaded bottles - - $HOME/Library/Caches/Homebrew - # pyenv - - $HOME/.pyenv_cache - - $HOME/.pyenv/versions/3.7.8 - - $HOME/.pyenv/versions/2.7.15 # scikit-ci-addons - $HOME/downloads before_install: - | - # Workaround the following error occuring because python installation is cached but gettext dependency is not - # dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib - # Referenced from: /Users/travis/.pyenv/versions/3.7.2/bin/python - # Reason: Incompatible library version: python requires version 11.0.0 or later, but libintl.8.dylib provides version 10.0.0 - if [[ "$TRAVIS_OS_NAME" == "osx" && "${PYTHON_VERSION}" == "3.7.8" ]]; then - brew install gettext + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + curl -fsSLo /tmp/Python.pkg "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg" + sudo installer -pkg /tmp/Python.pkg -target / + PYTHON_VERSION2=${PYTHON_VERSION%.*} + PYTHON_VERSION1=${PYTHON_VERSION2%.*} + curl -fsSLo /tmp/install_certifi.py https://github.com/joerick/cibuildwheel/raw/v1.10.0/cibuildwheel/resources/install_certifi.py + sudo /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} /tmp/install_certifi.py + /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} -m pip install virtualenv + /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION2}/bin/python${PYTHON_VERSION1} -m virtualenv ${HOME}/.pyenv/versions/${PYTHON_VERSION} + source ${HOME}/.pyenv/versions/${PYTHON_VERSION}/bin/activate fi - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python python scripts/ssl-check.py python -m pip install --disable-pip-version-check --upgrade pip pip install -U scikit-ci scikit-ci-addons