-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtravis_setup.sh
28 lines (27 loc) · 938 Bytes
/
travis_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
if [ "$TRAVIS_OS_NAME" == "osx" ]; then # use homebrew version
echo "Updating brew"
brew update
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"
cd "hdf5-1.10.9"
export HDF5_INSTALL_DIR=$TRAVIS_BUILD_DIR/cbuild
mkdir $HDF5_INSTALL_DIR
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
./configure --prefix=$HDF5_INSTALL_DIR
sudo make install 2>&1 | tail -n200
else
# Windows build
mkdir cmake && cd cmake
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=$HDF5_INSTALL_DIR .. -DBUILD_TESTING:BOOL=OFF
cmake --build . --config Release
cmake --build . --config Release --target install
cd ..
fi
cd ..
fi