From 85d14948dc98d1212d39754defd5eb949ab2d0bb Mon Sep 17 00:00:00 2001 From: Simon Shanks <59612559+sshanks-kx@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:27:50 +0100 Subject: [PATCH] Improve osx builds (#49) * Improve osx builds * Fix line ending * Try newer travis image for build speed&fix osx lib * Retry --- .travis.yml | 11 +++++++++-- travis_setup.sh | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e94576..5070de5 100755 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ jobs: - dist: focal os: linux - os: osx + osx_image: xcode13.1 - os: windows language: c compiler: gcc @@ -23,8 +24,7 @@ before_install: - if [[ $BUILD == "True" ]]; then chmod +x travis_setup.sh; ./travis_setup.sh; - export HDF5_INSTALL_DIR=$TRAVIS_BUILD_DIR/cbuild; - mkdir cmake + mkdir cmake; else echo "no build."; fi @@ -39,6 +39,13 @@ before_install: echo "unknown OS ('$TRAVIS_OS_NAME')" >&2; exit 1; fi + - if [[ $BUILD == "True" && $TRAVIS_OS_NAME == "osx" ]]; then + export HDF5_INSTALL_DIR="/usr/local/opt/hdf5@1.10/"; + else + export HDF5_INSTALL_DIR=$TRAVIS_BUILD_DIR/cbuild; + fi + - echo "HDF5_INSTALL_DIR '$HDF5_INSTALL_DIR'"; + - export LD_LIBRARY_PATH=$HDF5_INSTALL_DIR/lib:$LD_LIBRARY_PATH - export DYLD_LIBRARY_PATH=$HDF5_INSTALL_DIR/lib:$DYLD_LIBRARY_PATH - export PATH=$HDF5_INSTALL_DIR/lib:$PATH diff --git a/travis_setup.sh b/travis_setup.sh index 5b17fad..7f2f6f5 100644 --- a/travis_setup.sh +++ b/travis_setup.sh @@ -1,9 +1,12 @@ #!/bin/bash if [ "$TRAVIS_OS_NAME" == "osx" ]; then # use homebrew version + echo "Updating brew" brew update - brew install hdf5 + echo "Installing hdf5" + brew install hdf5@1.10 echo "brew install finished" + export HDF5_INSTALL_DIR="/usr/local/opt/hdf5@1.10/" else # install from source wget --no-check-certificate "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.9/src/hdf5-1.10.9.tar.gz" tar -xzf "hdf5-1.10.9.tar.gz"