Skip to content

Commit d4f7ea0

Browse files
jkotanggoneiESS
andauthored
Issue 677: add cmake/FindHDF5.cmake back (#678)
* add debian11 tests * add cmake/FindHDF5.cmake back * add cmake/FindHDF5.cmake back * shorten the debian label * change deb to dpkg * small typo --------- Co-authored-by: George O'Neill <george.oneill@ess.eu>
1 parent 70325af commit d4f7ea0

File tree

5 files changed

+1258
-8
lines changed

5 files changed

+1258
-8
lines changed

.github/workflows/cmake-build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,10 @@ jobs:
249249
run: |
250250
cd build
251251
ctest --extra-verbose --no-tests=error
252-
debian-12:
252+
dpkg:
253253
strategy:
254254
matrix:
255+
os: [debian12, debian11]
255256
shared: [shared, static]
256257
boost: [boost, stdfs]
257258
mpi: [
@@ -262,7 +263,9 @@ jobs:
262263
steps:
263264
- uses: actions/checkout@v4
264265
- name: Build the docker
265-
run: docker build -t build .github/workflows/debian12
266+
env:
267+
OS: ${{ matrix.os }}
268+
run: docker build -t build .github/workflows/${OS}
266269

267270
- name: Run the docker
268271
run: docker run --name build -i -d -v"$PWD:/home/p00user/src" build
@@ -289,7 +292,7 @@ jobs:
289292
- name: Build all
290293
run: docker exec build /bin/bash -c "cd ../build && cmake --build . -- -j 2"
291294
- name: Build html
292-
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial'
295+
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial' && matrix.os == 'debian12'
293296
run: docker exec build /bin/bash -c "cd ../build && cmake --build . --target html"
294297
- name: Run tests
295298
run: docker exec build /bin/bash -c "cd ../build && ctest --extra-verbose --no-tests=error"
@@ -298,7 +301,7 @@ jobs:
298301
- name: Build examples
299302
run: docker exec build /bin/bash -c "mkdir ../examples_build && cd ../examples_build && cmake ../src/examples -DCMAKE_BUILD_TYPE=Release && cmake --build . -- -j 2 "
300303
- name: Append documentation for the latest release version
301-
if: startsWith(github.ref, 'refs/heads/master') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial'
304+
if: startsWith(github.ref, 'refs/heads/master') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial' && matrix.os == 'debian12'
302305
run: |
303306
docker exec --user root build /bin/bash -c "chown -R p00user /home/p00user/src"
304307
docker exec build /bin/bash -c "git config --unset-all remote.origin.fetch"
@@ -314,14 +317,14 @@ jobs:
314317
docker exec build /bin/bash -c "rm -rf ./latest/_sources"
315318
316319
- name: Extract the code version from the branch name
317-
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial'
320+
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial' && matrix.os == 'debian12'
318321
shell: bash
319322
run: echo "docver=$(echo ${GITHUB_REF#refs/heads/docs_})" >> $GITHUB_OUTPUT
320323
# run: echo "##[set-output name=docver;]$(echo ${GITHUB_REF#refs/heads/docs_})"
321324
id: extract_docver
322325

323326
- name: Append documentation for the extracted release version
324-
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial'
327+
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial' && matrix.os == 'debian12'
325328
run: |
326329
echo Version: ${{ steps.extract_docver.outputs.docver }}
327330
docker exec --user root build /bin/bash -c "chown -R p00user /home/p00user/src"
@@ -339,7 +342,7 @@ jobs:
339342
docker exec build /bin/bash -c "rm -rf ./${{ steps.extract_docver.outputs.docver }}/_sources"
340343
341344
- name: Deploy documentation
342-
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial'
345+
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.shared == 'shared' && matrix.boost == 'stdfs' && matrix.mpi == 'serial' && matrix.os == 'debian12'
343346
uses: s0/git-publish-subdir-action@develop
344347
env:
345348
REPO: self

.github/workflows/debian11/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM debian:bullseye
2+
3+
RUN apt-get update
4+
RUN apt-get install -y base-passwd apt-utils dialog -y
5+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
6+
RUN apt-get -qq update && apt-get -qq install -y libterm-readline-gnu-perl software-properties-common coreutils gnupg2 procps curl apt-transport-https gnupg2 ca-certificates wget
7+
RUN apt-get -qq update && apt-get -qq -y dist-upgrade
8+
RUN apt-get -qq update && apt-get -y install cmake g++ doxygen python3-sphinx git graphviz texlive doxygen pkg-config texlive-latex-extra texlive-latex-recommended texlive-pictures python3-pygments lsb-release python3-breathe texlive-pictures python3-sphinx-rtd-theme libjs-mathjax fonts-mathjax fonts-mathjax-extras ghostscript cmake catch2 libboost-filesystem-dev
9+
10+
RUN apt-get clean
11+
12+
# add p00user
13+
RUN useradd -rm -d /home/p00user -s /bin/bash p00user
14+
USER p00user
15+
RUN mkdir -p /home/p00user/src
16+
WORKDIR /home/p00user/src

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ install(FILES
171171
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}
172172
COMPONENT development)
173173

174+
install(FILES
175+
cmake/FindHDF5.cmake
176+
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}/hdf5
177+
COMPONENT development)
178+
174179
#
175180
# uninstall target
176181
#

0 commit comments

Comments
 (0)