| 1 |
name: h5z-zfp |
| 2 |
|
| 3 |
# Controls when the action will run. |
| 4 |
#Triggers the workflow on push or pull requests. |
| 5 |
|
| 6 |
# TODO: REMOVE feat-cmake_tests before merging |
| 7 |
on: |
| 8 |
push: |
| 9 |
branches: [ master ] |
| 10 |
pull_request: |
| 11 |
branches: [ master ] |
| 12 |
|
| 13 |
# Using concurrency to cancel any in-progress job or run |
| 14 |
concurrency: |
| 15 |
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }} |
| 16 |
cancel-in-progress: true |
| 17 |
|
| 18 |
# A workflow run is made up of one or more jobs that |
| 19 |
# can run sequentially or in parallel |
| 20 |
jobs: |
| 21 |
# This workflow contains a single job called "build" |
| 22 |
linux-build: |
| 23 |
strategy: |
| 24 |
matrix: |
| 25 |
name: ["Ubuntu Latest GCC"] |
| 26 |
include: |
| 27 |
- name: "Ubuntu Latest GCC" |
| 28 |
artifact: "Linux.tar.xz" |
| 29 |
os: ubuntu-latest |
| 30 |
|
| 31 |
name: ${{ matrix.name }} |
| 32 |
# The type of runner that the job will run on. |
| 33 |
runs-on: ${{ matrix.os }} |
| 34 |
if: "!contains(github.event.head_commit.message, 'skip-ci')" |
| 35 |
|
| 36 |
# Steps represent a sequence of tasks that will be executed |
| 37 |
# as part of the job. |
| 38 |
steps: |
| 39 |
- name: Install Dependencies (Linux) |
| 40 |
if: matrix.os == 'ubuntu-latest' |
| 41 |
run: | |
| 42 |
sudo apt-get update |
| 43 |
sudo apt-get install -qq libhdf5-dev |
| 44 |
sudo apt-get install -qq hdf5-tools |
| 45 |
echo "HDF5_HOME=/usr/include/hdf5/serial,/usr/lib/x86_64-linux-gnu/hdf5/serial,/usr/bin" >> $GITHUB_ENV |
| 46 |
# Set env vars |
| 47 |
echo "CC=gcc" >> $GITHUB_ENV |
| 48 |
echo "FC=gfortran" >> $GITHUB_ENV |
| 49 |
echo "CXX=g++" >> $GITHUB_ENV |
| 50 |
|
| 51 |
# Checks-out the repository under $GITHUB_WORKSPACE so the job can access it. |
| 52 |
- name: Get Sources |
| 53 |
uses: actions/checkout@v3 |
| 54 |
|
| 55 |
################################## |
| 56 |
# INSTALL ZFP |
| 57 |
################################## |
| 58 |
|
| 59 |
- name: install ZFP |
| 60 |
run: | |
| 61 |
git clone https://github.com/LLNL/zfp.git |
| 62 |
export HOME_DIR=$(echo ~) |
| 63 |
cd zfp |
| 64 |
git checkout 1.0.0 |
| 65 |
mkdir build;cd build |
| 66 |
cmake -D ZFP_BIT_STREAM_WORD_SIZE=8 -D BUILD_CFP=ON -D CMAKE_INSTALL_PREFIX=$PWD/zfp -D BUILD_TESTING=OFF -D BUILD_UTILITIES=OFF .. |
| 67 |
make install |
| 68 |
echo "ZFP_HOME=$PWD/zfp" >> $GITHUB_ENV |
| 69 |
echo "ZFP_DIR=$PWD/zfp" >> $GITHUB_ENV |
| 70 |
shell: bash |
| 71 |
|
| 72 |
################################## |
| 73 |
# BUILD AND TEST H5Z-ZFP |
| 74 |
################################## |
| 75 |
|
| 76 |
- name: build (autotools) and check |
| 77 |
run: | |
| 78 |
make all |
| 79 |
make check |
| 80 |
shell: bash |
| 81 |
|
| 82 |
- name: build (cmake) and test |
| 83 |
run: | |
| 84 |
mkdir build; cd build |
| 85 |
cmake -D FORTRAN_INTERFACE=ON -D CMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON .. |
| 86 |
sudo cmake --build . --target install |
| 87 |
ctest -C Release . |
| 88 |
shell: bash |
| 89 |
|
| 90 |
|
| 91 |
windows-build: |
| 92 |
name: 'Windows MSVC/Clang' |
| 93 |
defaults: |
| 94 |
run: |
| 95 |
shell: bash |
| 96 |
runs-on: windows-2019 |
| 97 |
steps: |
| 98 |
- name: checkout repository |
| 99 |
uses: actions/checkout@v3 |
| 100 |
- name: install prerequisites |
| 101 |
run: | |
| 102 |
choco install \ |
| 103 |
unzip \ |
| 104 |
wget |
| 105 |
- name: setup MSVC Tools |
| 106 |
uses: ilammy/msvc-dev-cmd@v1 |
| 107 |
- name: download HDF5 for Windows |
| 108 |
run: | |
| 109 |
wget --quiet \ |
| 110 |
https://support.hdfgroup.org//ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.1/bin/windows/hdf5-1.14.1-2-Std-win10_64-vs16-clang.zip |
| 111 |
unzip hdf5-1.14.1-2-Std-win10_64-vs16-clang.zip |
| 112 |
- name: Install HDF5 for Windows |
| 113 |
run: msiexec /i "hdf\HDF5-1.14.1-win64.msi" /qn |
| 114 |
shell: cmd |
| 115 |
- name: Download and install ZFP |
| 116 |
run: | |
| 117 |
git clone https://github.com/LLNL/zfp.git |
| 118 |
cd zfp |
| 119 |
git checkout 1.0.0 |
| 120 |
mkdir -p build |
| 121 |
cd build |
| 122 |
cmake .. \ |
| 123 |
-G "Visual Studio 16 2019" -A "x64" \ |
| 124 |
-DCMAKE_CONFIGURATION_TYPES=Release \ |
| 125 |
-DBUILD_UTILITIES=OFF \ |
| 126 |
-DBUILD_TESTING=OFF \ |
| 127 |
-DBUILD_CFP=ON \ |
| 128 |
-DZFP_BIT_STREAM_WORD_SIZE=8 |
| 129 |
cmake --build . --config Release -j 3 |
| 130 |
cmake --build . --config Release --target install |
| 131 |
- name: Set build and test variables |
| 132 |
run: | |
| 133 |
echo "C:/Program Files/H5Z_ZFP/plugin" >> $GITHUB_PATH |
| 134 |
echo "C:/Program Files/ZFP/bin" >> $GITHUB_PATH |
| 135 |
echo "C:/Program Files/ZFP/lib" >> $GITHUB_PATH |
| 136 |
echo "C:/Program Files/HDF_Group/HDF5/1.14.1/bin" >> $GITHUB_PATH |
| 137 |
echo "HDF5_PLUGIN_PATH=C:/Program Files/H5Z_ZFP/plugin" >> $GITHUB_ENV |
| 138 |
echo "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.14.1" >> $GITHUB_ENV |
| 139 |
echo "HDF5_ROOT=C:/Program Files/HDF_Group/HDF5/1.14.1" >> $GITHUB_ENV |
| 140 |
echo "ZFP_DIR=C:/Program Files/ZFP" >> $GITHUB_ENV |
| 141 |
- name: Build H5Z-ZFP (CMake) and test |
| 142 |
run: | |
| 143 |
mkdir build |
| 144 |
cd build |
| 145 |
cmake .. \ |
| 146 |
-G "Visual Studio 16 2019" -A "x64" \ |
| 147 |
-DCMAKE_CONFIGURATION_TYPES=Release \ |
| 148 |
-DBUILD_TESTING=ON \ |
| 149 |
-DFORTRAN_INTERFACE=OFF \ |
| 150 |
-TClangCL |
| 151 |
cmake --build . --config Release --target install |
| 152 |
ctest -C Release . |