Skip to content

Commit

Permalink
Travis reports error when it cannot find a wheel (#243)
Browse files Browse the repository at this point in the history
* Travis reports error when it cannot find a wheel to update on non-Python builds

* Downgrade Mac image to Xcode 7.3 to support older Macs

* Try another image

* Add echo

* Upgrade to xcode10

* Update

* remove all brew commands

* Remove brew code

* Remove dotnet check

* Just add swig

* Fix logging

* Try to disable auto clean up in homebrew

* Avoid auto update

* Add dotnet standard back

* Fix conda

* Fix another bug

* Fix linux test

* Clean up
  • Loading branch information
ezralanglois authored Dec 22, 2020
1 parent 23d1f27 commit 51379fa
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 33 deletions.
71 changes: 55 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,68 @@ language: cpp
env:
global:
secure: "u1PKXB6w4ca3qONKKdMNS7NvPTGyXa9FuSBvM4IC+Yak0k4P8pghA3iwrtzwCkXzT+kijcVpbOvDJjhD1Kfb0fucpYKEbR+QTTBpqXjwWZx6WHSH/ZoPfc40OiGJ5zbdyRZrI2GKdrgeZbDN2FOE7Vvmu/RgxCdSkpeBmRG2uTqgmVA+Gy+BJBtRgwKdmvChaqIQ7Zwbrw26JA1g+iKDNKSw3SyKbRrkCv2i5u2YrVS3XhbCCCJCt1HmsMZfjFhvx4ddnfQ9At/Z1bx58bb607lhKbWT1AR+NIXtbYz7sGGPxLuUply9KVDzE+3yb72zVIa3R8Nl/cBtS3S2rDyDvaLy3zTpF25jHNxEx956yI8n25lA2qtwqAs7sw+neSvivlEQot0GVPy2r0tsezNFt6GSJG92KYT4TsDVZr8EXQr6n0ocDmMQU/tVqxeG6VelqpjJ257gT1ywU7mtod43ye/7FO+5Is2LbGVq5nWHW203joKo2mLyx2p3/l7EW2o6kDhu+ttiaR6YMYMpnpe+IGWMRhKOxtVH4EJuOKB3G6UfSZmXauwXZdxqN03wqvZnXhDp+cr1p6Wj3L5LyENpw/dS38fRTFBJzNYUTtYatiNVUptI9RGSdkcgvgx3e43XIumgvk7/Tea7DjVEMIXMSj/N1c7P8eJZbiXQmmqa65w="

matrix:
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
fast_finish: true
include:
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
stage: s1
workspaces:
create:
name: brew_cache
paths:
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew/
# used in OSX custom build script dealing with local bottle caching
- $HOME/local_bottle_metadata
cache:
directories:
# `cache: ccache: true` has no effect if `language:` is not `c` or `cpp`
- $HOME/.ccache
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew/
# used in OSX custom build script dealing with local bottle caching
- $HOME/local_bottle_metadata
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release Disable"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release DotNetStandard"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release 2.7.17"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release 3.5.9"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release 3.6.10"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release 3.7.7"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
compiler: clang
workspaces:
use: brew_cache
env: DEPLOY_BUILD=true SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Release 3.8.2"
- os: linux
compiler: clang
Expand All @@ -65,7 +97,9 @@ matrix:
- docker
env: DEPLOY_BUILD=true DEPLOY_DOCS=true DOCKER_IMAGE=ezralanglois/interop SCRIPT="docker run --rm -v $PWD:/io ezralanglois/interop sh /io/tools/package.sh /io /io/dist travis OFF Release None"
- os: osx
osx_image: xcode12.2
osx_image: xcode9.4
workspaces:
use: brew_cache
compiler: clang
env: SCRIPT="bash ./tools/package.sh $PWD $PWD/dist travis OFF Debug Disable"
- os: linux
Expand Down Expand Up @@ -119,15 +153,10 @@ addons:
- mono-complete
- libgtest-dev
- python-numpy
cache:
directories:
- $HOME/NUnit-2.6.4
- $HOME/cmake

install:
- source tools/prereqs/travis-${TRAVIS_OS_NAME}-install.sh
- if [ ! -z $DOCKER_IMAGE ]; then docker pull $DOCKER_IMAGE ; fi
- ls $HOME/NUnit-2.6.4

before_script:
- export CC="${COMPILER_HOME}${CC}${COMPILER_VERSION}"
Expand All @@ -154,7 +183,7 @@ before_deploy:
- if [ "$TRAVIS_OS_NAME != "osx ] ; then env "PATH=$PATH" pyenv install 3.5.4 -s || true; fi
- if [ "$TRAVIS_OS_NAME != "osx ] ; then env "PATH=$PATH" pyenv global 3.5.4; fi
- if [ "$TRAVIS_OS_NAME != "osx ] ; then env "PATH=$PATH" pip install twine; fi
- if [ "$TRAVIS_TAG" != "" ] && [ "$DEPLOY_BUILD" == "true" ] ; then twine upload --skip-existing $PWD/dist/*.whl; fi
- if [ "$TRAVIS_TAG" != "" ] && [ "$DEPLOY_BUILD" == "true" ] && [ -e $(compgen -G $PWD/dist/*.whl) ] ; then twine upload --skip-existing $PWD/dist/*.whl; fi

deploy:
- provider: releases
Expand All @@ -179,3 +208,13 @@ deploy:
condition:
- "$DEPLOY_DOCS == true"

cache:
directories:
# `cache: ccache: true` has no effect if `language:` is not `c` or `cpp`
- $HOME/.ccache
- $HOME/NUnit-2.6.4
- $HOME/cmake

stages:
- s1
- final
8 changes: 8 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changes {#changes}

## v1.1.17

Date | Description
---------- | -----------
2020-12-05 | Downgrade Mac image to Xcode 7.3 to support older Macs
2020-12-04 | Travis reports error when it cannot find a wheel to update on non-Python builds


## v1.1.16

Date | Description
Expand Down
5 changes: 3 additions & 2 deletions tools/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,12 @@ if [ "$PYTHON_VERSION" != "" ] && [ "$PYTHON_VERSION" != "Disable" ] && [ "$PYTH
source $HOME/miniconda/etc/profile.d/conda.sh
conda config --set channel_priority strict
#conda update --all
echo "Found Miniconda"
fi
for py_ver in $python_versions; do
echo "Building Python $py_ver - $CFLAGS"
if [ -e "/Users/bioinformatics/anaconda3" ]; then
python_version=${py_ver}
if hash conda 2> /dev/null; then
python_version=${py_ver%.*}
conda remove --name py${python_version} --all -y || echo "py${python_version} not found"
echo "Create Python ${python_version}"
conda create --no-default-packages -n py${python_version} python=${python_version} -y # || conda create --no-default-packages -n py${python_version} python=${python_version} -y -c conda-forge
Expand Down
33 changes: 18 additions & 15 deletions tools/prereqs/travis-osx-install.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
#!/usr/bin/env bash

#sw_vers
echo "Install requirements using HomeBrew"
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_AUTO_UPDATE=1 # Fix

#brew update > /dev/null
#brew list
set +x
brew list cmake > /dev/null || time brew upgrade cmake
brew install zlib
time brew install swig@3
set -x

brew list swig@3 || brew install swig@3
brew unlink swig || true
brew link swig@3 --force
time brew install doxygen
brew install wget
brew install doxygen
brew install nuget
brew install coreutils || brew install gstat

brew tap isen-ng/dotnet-sdk-versions
brew cask list dotnet-sdk > /dev/null || time brew cask install dotnet-sdk2-2-400
#brew cask list dotnet-sdk > /dev/null || time brew cask install dotnet-sdk
brew cask list dotnet-sdk || brew cask install dotnet-sdk2-2-400

brew list miniconda

set +x
echo "Install Anaconda"
set -x
time curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
time bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh

echo "OpenSSL: $(brew --prefix openssl)"
export PATH=$(pyenv root)/shims:${PATH}

which conda
dotnet --version

set +x
echo "Finished requirements"



0 comments on commit 51379fa

Please sign in to comment.