2727 BUCKET_NAME : hsdstest
2828
2929jobs :
30- build_and_test_with_autotools :
30+ build_and_test :
3131 strategy :
3232 fail-fast : false
3333 matrix :
34- os : [ubuntu-latest]
34+ os : [ubuntu-22.04, ubuntu-latest]
35+ build_system : ["autotools", "cmake"]
3536 python-version : ["3.10"]
36- hdf5-branch : ["hdf5_1_14"]
37+ hdf5-branch : ["hdf5_1_14", "develop"]
38+ exclude :
39+ # hdf5 2.0.0+ does not support autotools
40+ - hdf5-branch : " develop"
41+ build_system : " autotools"
3742
3843 runs-on : ${{matrix.os}}
3944 steps :
5055 sudo apt-get install libyajl-dev
5156
5257 - name : Get Autotools Dependencies
58+ if : matrix.build_system == 'autotools'
5359 run : |
5460 sudo apt update
5561 sudo apt install automake autoconf libtool libtool-bin
5965 with :
6066 path : ${{github.workspace}}/vol-rest
6167
62- - name : Autotools Configure + Build HDF5
68+ - name : CMake Configure + Build HDF5
69+ if : matrix.build_system == 'cmake'
70+ run : |
71+ mkdir ${{github.workspace}}/hdf5/build
72+ cd ./build
73+ cmake \
74+ -DHDF5_BUILD_HL_LIB=ON \
75+ -DBUILD_SHARED_LIBS=ON \
76+ -DHDF5_TEST_API=ON \
77+ -DCMAKE_BUILD_TYPE=Release \
78+ -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/hdf5install \
79+ ..
80+ make
81+ make install
82+ shell : bash
83+ working-directory : ${{github.workspace}}/hdf5
84+
85+ - name : Autotools Configure + Build HDF5
86+ if : matrix.build_system == 'autotools'
6387 run : |
6488 ./autogen.sh
6589 ./configure --prefix=${{github.workspace}}/hdf5install \
@@ -70,21 +94,44 @@ jobs:
7094 shell : bash
7195 working-directory : ${{github.workspace}}/hdf5
7296
97+ - name : CMake Configure REST VOL
98+ if : matrix.build_system == 'cmake'
99+ run : |
100+ mkdir ./build
101+ cd ./build
102+ CFLAGS="-D_POSIX_C_SOURCE=200809L" cmake -G "Unix Makefiles" -DHDF5_ROOT=${{github.workspace}}/hdf5install \
103+ -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/vol-rest/install \
104+ ..
105+ shell : bash
106+ working-directory : ${{github.workspace}}/vol-rest
107+
73108 - name : Autotools Configure REST VOL
109+ if : matrix.build_system == 'autotools'
74110 run : |
75111 ./autogen.sh
76112 mkdir ${{github.workspace}}/vol-rest/install
77- CFLAGS="-D_POSIX_C_SOURCE=200809L" ./configure --prefix=${{github.workspace}}/vol-rest/install --with-hdf5=${{github.workspace}}/hdf5install
113+ CFLAGS="-D_POSIX_C_SOURCE=200809L" ./configure \
114+ --prefix=${{github.workspace}}/vol-rest/install \
115+ --with-hdf5=${{github.workspace}}/hdf5install
78116 shell : bash
79117 working-directory : ${{github.workspace}}/vol-rest
80118
81- - name : Build + Install REST VOL
119+ - name : Build + Install REST VOL (Autotools)
120+ if : matrix.build_system == 'autotools'
82121 run : |
83- make
122+ make -j
84123 make install
85124 shell : bash
86125 working-directory : ${{github.workspace}}/vol-rest/
87126
127+ - name : Build + Install REST VOL (CMake)
128+ if : matrix.build_system == 'cmake'
129+ run : |
130+ make -j
131+ make install
132+ shell : bash
133+ working-directory : ${{github.workspace}}/vol-rest/build/
134+
88135 - uses : actions/checkout@v4
89136 with :
90137 repository : HDFGroup/hsds
@@ -114,19 +161,12 @@ jobs:
114161 cd ${{github.workspace}}/hsds
115162 pytest
116163
117- - name : Install valgrind
118- run : |
119- sudo apt update
120- sudo apt install valgrind
121- working-directory : ${{ github.workspace }}
122-
123164 # Requests 2.32.0 breaks requests-unixsocket, used by HSDS for socket connections
124165 - name : Fix requests version
125166 run : |
126167 pip install requests==2.31.0
127168
128169 - name : Start HSDS
129- if : ${{ matrix.endpoint != 'http://127.0.0.1:5101'}}
130170 run : |
131171 cd ${{github.workspace}}/hsds
132172 mkdir ${{github.workspace}}/hsdsdata &&
@@ -140,149 +180,34 @@ jobs:
140180 working-directory : ${{github.workspace}}/hsds
141181
142182 - name : Test HSDS
143- if : ${{matrix.endpoint != 'http://127.0.0.1:5101'}}
144183 run : |
145184 python tests/integ/setup_test.py
146185 working-directory : ${{github.workspace}}/hsds
147186
148- - name : Test REST VOL
187+ - name : Test REST VOL (Autotools)
188+ if : matrix.build_system == 'autotools'
149189 working-directory : ${{github.workspace}}/vol-rest/
190+ env :
191+ HDF5_PLUGIN_PATH : ${{github.workspace}}/vol-rest/install/lib
150192 run : |
151- HDF5_PLUGIN_PATH=${{github.workspace}}/vol-rest/install/lib HDF5_VOL_CONNECTOR=REST ./test/test_rest_vol
152-
153- build_and_test_with_cmake :
154- strategy :
155- fail-fast : false
156- matrix :
157- os : [ubuntu-latest]
158- python-version : ["3.10"]
159- hdf5-branch : ["hdf5_1_14", "develop"]
160-
161- runs-on : ${{matrix.os}}
162- steps :
163- - uses : actions/checkout@v4
164- with :
165- repository : HDFGroup/hdf5
166- ref : ${{matrix.hdf5-branch}}
167- path : ${{github.workspace}}/hdf5
168-
169- - name : Get REST VOL dependencies
170- run : |
171- sudo apt-get update
172- sudo apt-get install libcurl4-openssl-dev
173- sudo apt-get install libyajl-dev
174-
175- - name : Get REST VOL
176- uses : actions/checkout@v4
177- with :
178- path : ${{github.workspace}}/vol-rest
193+ ./test/test_rest_vol
179194
180- - name : CMake Configure + Build HDF5
181- run : |
182- mkdir ${{github.workspace}}/hdf5/build
183- cd ./build
184- cmake \
185- -DHDF5_BUILD_HL_LIB=ON \
186- -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_SZIP_SUPPORT=OFF \
187- -DHDF5_TEST_API=ON \
188- -DHDF5_ENABLE_Z_LIB_SUPPORT=OFF \
189- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHDF5_ENABLE_THREADSAFE=OFF \
190- -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/hdf5install \
191- ..
192- make
193- make install
194- shell : bash
195- working-directory : ${{github.workspace}}/hdf5
196-
197- - name : CMake Configure REST VOL
198- run : |
199- mkdir ./build
200- cd ./build
201- CFLAGS="-D_POSIX_C_SOURCE=200809L" cmake -G "Unix Makefiles" -DHDF5_ROOT=${{github.workspace}}/hdf5install \
202- -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/vol-rest/install \
203- ..
204- shell : bash
205- working-directory : ${{github.workspace}}/vol-rest
206-
207- - name : Build + Install REST VOL
208- run : |
209- make
210- make install
211- shell : bash
212- working-directory : ${{github.workspace}}/vol-rest/build
213-
214- - uses : actions/checkout@v4
215- with :
216- repository : HDFGroup/hsds
217- path : ${{github.workspace}}/hsds
218-
219- - name : Set up Python ${{ matrix.python-version }}
220- uses : actions/setup-python@v5
221- with :
222- python-version : ${{ matrix.python-version }}
223-
224- - name : Install HSDS dependencies
225- shell : bash
226- run : |
227- python -m pip install --upgrade pip
228- python -m pip install pytest
229- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
230-
231- - name : Install HSDS package
232- shell : bash
233- run : |
234- cd ${{github.workspace}}/hsds
235- pip install -e .
236-
237- - name : Run HSDS unit tests
238- shell : bash
239- run : |
240- cd ${{github.workspace}}/hsds
241- pytest
242-
243- - name : Install valgrind
244- run : |
245- sudo apt update
246- sudo apt install valgrind
247- working-directory : ${{ github.workspace }}
248-
249- # Requests 2.32.0 breaks requests-unixsocket, used by HSDS for socket connections
250- - name : Fix requests version
195+ - name : Test REST VOL (CMake)
196+ if : matrix.build_system == 'cmake'
197+ working-directory : ${{github.workspace}}/vol-rest/build/
198+ env :
199+ HDF5_PLUGIN_PATH : ${{github.workspace}}/vol-rest/install/lib
251200 run : |
252- pip install requests==2.31.0
201+ ctest -R "test_rest_vol" -VV
253202
254- - name : Start HSDS
255- if : ${{ matrix.endpoint != 'http://127.0.0.1:5101'}}
256- run : |
257- cd ${{github.workspace}}/hsds
258- mkdir ${{github.workspace}}/hsdsdata &&
259- mkdir ${{github.workspace}}/hsdsdata/hsdstest &&
260- cp admin/config/groups.default admin/config/groups.txt &&
261- cp admin/config/passwd.default admin/config/passwd.txt &&
262- cp admin/config/groups.default admin/config/groups.txt &&
263- cp admin/config/passwd.default admin/config/passwd.txt
264- ROOT_DIR=${{github.workspace}}/hsdadata ./runall.sh --no-docker 1 &
265- sleep 10
203+ - name : Show HSDS Logs on Fail
204+ if : ${{failure()}}
266205 working-directory : ${{github.workspace}}/hsds
267-
268- - name : Test HSDS
269- if : ${{matrix.endpoint != 'http://127.0.0.1:5101'}}
270- run : |
271- python tests/integ/setup_test.py
272- working-directory : ${{github.workspace}}/hsds
273-
274- - name : Set HDF5 Plugin path
275- run : |
276- echo "HDF5_PLUGIN_PATH=${{github.workspace}}/vol-rest/build/bin/" >> $GITHUB_ENV
277- echo "HDF5_VOL_CONNECTOR=REST" >> $GITHUB_ENV
278-
279- - name : Test REST VOL
280- working-directory : ${{github.workspace}}/vol-rest/build/
281206 run : |
282- valgrind --leak-check=full -s ctest -R "test_rest_vol" -VV
207+ cat hs.log
283208
284209# TODO: Attribute, dataset, link, and testhdf5 tests currently fail
285210# - name: Test REST VOL with API
286211# run: |
287- # valgrind --leak-check=full -s ctest -R "vol-rest" -VV
212+ # ctest -R "vol-rest" -VV
288213# working-directory: ${{github.workspace}}/hdf5/build/
0 commit comments