Skip to content

Commit

Permalink
Improve osx builds (#49)
Browse files Browse the repository at this point in the history
* Improve osx builds

* Fix line ending

* Try newer travis image for build speed&fix osx lib

* Retry
  • Loading branch information
sshanks-kx authored Sep 23, 2022
1 parent bc60cf7 commit 85d1494
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
- dist: focal
os: linux
- os: osx
osx_image: xcode13.1
- os: windows
language: c
compiler: gcc
Expand All @@ -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
Expand All @@ -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/[email protected]/";
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
Expand Down
5 changes: 4 additions & 1 deletion travis_setup.sh
Original file line number Diff line number Diff line change
@@ -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 [email protected]
echo "brew install finished"
export HDF5_INSTALL_DIR="/usr/local/opt/[email protected]/"
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"
Expand Down

0 comments on commit 85d1494

Please sign in to comment.