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