forked from HDFGroup/hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 2.2 KB
/
test.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
name: Build and Test HDF5 Library
on:
push:
branches:
- '*'
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
api_tests: ["--enable-api-tests", "--disable-api-tests"]
multi_thread: ["--enable-multithread --disable-hl", "--disable-multithread --enable-threadsafe --disable-hl", "--disable-multithread --disable-threadsafe"]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up autotools
run: |
sudo apt install automake autoconf libtool libtool-bin
sudo apt install libaec0 libaec-dev valgrind
- name: Configure HDF5
working-directory: ${{github.workspace}}
run: |
sh ./autogen.sh
./configure --enable-shared --enable-tests ${{ matrix.multi_thread }} ${{ matrix.api_tests }} --enable-build-mode=debug
- name: Build HDF5
working-directory: ${{github.workspace}}
run: |
make -j
- name: API Tests
if: matrix.api_tests == '--enable-api-tests'
working-directory: ${{github.workspace}}
run: |
valgrind ./test/API/api_tests
- name: Multithread H5VL Tests
if: matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
run: |
valgrind ./test/threads/unit/mt_vl_test
- name: Invalid API Usage Test
if: matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
run: |
./test/threads/unit/mt_invalid_api_test
if [ $? -eq 0 ]; then echo "Unexpected success: Invalid API Test should have triggered assertion failure"; false; else echo "Virtual Lock assertion successfully triggered"; true; fi
- name: Test HDF5
working-directory: ${{github.workspace}}
run: |
make check