Skip to content

Commit 601012d

Browse files
committed
Add FreeBSD test workflow
1 parent 2ef412f commit 601012d

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/freebsd.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: FreeBSD CI
2+
3+
# Triggers the workflow on push or pull request or on demand
4+
on:
5+
workflow_dispatch:
6+
push:
7+
pull_request:
8+
branches: [ develop ]
9+
paths-ignore:
10+
- '.github/CODEOWNERS'
11+
- '.github/FUNDING.yml'
12+
- 'doc/**'
13+
- 'release_docs/**'
14+
- 'ACKNOWLEDGEMENTS'
15+
- 'LICENSE**'
16+
- '**.md'
17+
18+
# Using concurrency to cancel any in-progress job or run
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
freebsd-build-and-test:
28+
runs-on: ubuntu-latest
29+
name: FreeBSD 14.2 Build and Test
30+
31+
# Don't run the action if the commit message says to skip CI
32+
if: "!contains(github.event.head_commit.message, 'skip-ci')"
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v5
37+
38+
- name: Build and test on FreeBSD
39+
uses: vmactions/freebsd-vm@v1
40+
with:
41+
release: '14.2'
42+
usesh: true
43+
prepare: |
44+
pkg install -y cmake ninja pkgconf bash curl
45+
run: |
46+
set -e
47+
48+
# Configure the build
49+
mkdir build
50+
cd build
51+
cmake -C ../config/cmake/cacheinit.cmake \
52+
-G Ninja \
53+
--log-level=VERBOSE \
54+
-DCMAKE_BUILD_TYPE=Release \
55+
-DBUILD_SHARED_LIBS:BOOL=ON \
56+
-DHDF5_ENABLE_ALL_WARNINGS:BOOL=ON \
57+
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
58+
-DHDF5_BUILD_CPP_LIB:BOOL=ON \
59+
-DHDF5_BUILD_FORTRAN:BOOL=OFF \
60+
-DHDF5_BUILD_JAVA:BOOL=OFF \
61+
-DHDF5_BUILD_DOC:BOOL=OFF \
62+
-DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON \
63+
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON \
64+
-DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \
65+
-DZLIB_USE_LOCALCONTENT:BOOL=OFF \
66+
-DHDF5_TEST_API:BOOL=ON \
67+
-DHDF5_TEST_SHELL_SCRIPTS:BOOL=OFF \
68+
-DENABLE_EXTENDED_TESTS:BOOL=OFF \
69+
..
70+
echo ""
71+
72+
# Build
73+
cmake --build . --parallel 3 --config Release
74+
echo ""
75+
76+
# Run tests
77+
ctest . --parallel 2 -C Release -V
78+
echo ""

0 commit comments

Comments
 (0)