Skip to content

Commit c86e4ec

Browse files
authored
Update CMake add presets (#190)
1 parent 5411b0b commit c86e4ec

197 files changed

Lines changed: 700077 additions & 2136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 338 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,338 @@
1+
name: hdf5 plugins bintest runs
2+
3+
# Triggers the workflow on a call from another workflow
4+
on:
5+
workflow_call:
6+
inputs:
7+
use_hdf:
8+
description: "The hdf5 base name of the binaries"
9+
required: true
10+
type: string
11+
file_base:
12+
description: "The common base name of the source tarballs"
13+
required: true
14+
type: string
15+
preset_name:
16+
description: "The common base name of the preset configuration name to control the build"
17+
required: true
18+
type: string
19+
use_environ:
20+
description: 'Environment to locate files'
21+
type: string
22+
required: true
23+
default: snapshots
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
test_binary_win:
30+
# Windows w/ MSVC + CMake
31+
#
32+
name: "Windows MSVC Binary Test"
33+
runs-on: windows-latest
34+
steps:
35+
- name: Install Dependencies (Windows)
36+
run: choco install ninja
37+
38+
- name: Enable Developer Command Prompt
39+
uses: ilammy/msvc-dev-cmd@v1.13.0
40+
41+
- name: Install CMake
42+
uses: jwlawson/actions-setup-cmake@v2
43+
with:
44+
cmake-version: '3.31.6'
45+
46+
- name: Get hdf5 snapshot
47+
if: ${{ (inputs.use_environ == 'snapshots') }}
48+
uses: dsaltares/fetch-gh-release-asset@master
49+
with:
50+
repo: 'HDFGroup/hdf5'
51+
version: 'tags/snapshot'
52+
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
53+
54+
- name: Get hdf5 release
55+
if: ${{ (inputs.use_environ == 'release') }}
56+
uses: dsaltares/fetch-gh-release-asset@master
57+
with:
58+
repo: 'HDFGroup/hdf5'
59+
version: 'tags/${{ inputs.use_hdf }}'
60+
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
61+
62+
- name: Uncompress gh binary (Win)
63+
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip
64+
65+
- name: Uncompress hdf5 binary (Win)
66+
working-directory: ${{ github.workspace }}/hdf5
67+
run: 7z x HDF5-*-win64.zip
68+
shell: bash
69+
70+
# Get files created by cmake-ctest script
71+
- name: Get published plugins binary (Windows)
72+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
73+
with:
74+
name: zip-vs2022_cl-binary
75+
path: ${{ github.workspace }}/hdf5
76+
77+
- name: Uncompress plugins gh binary (Win)
78+
run: 7z x ${{ github.workspace }}/hdf5/${{ inputs.file_base }}-win-vs2022_cl.zip
79+
80+
- name: List files for the space (Win)
81+
run: |
82+
ls -l ${{ github.workspace }}
83+
ls -l ${{ github.workspace }}/hdf5
84+
ls -l ${{ github.workspace }}/hdf5_plugins
85+
86+
- name: Uncompress plugins binary (Win)
87+
working-directory: ${{ github.workspace }}/hdf5_plugins
88+
run: 7z x h5pl-*-win64.zip
89+
shell: bash
90+
91+
- name: List files for the space (Win)
92+
run: |
93+
ls -l ${{ github.workspace }}
94+
ls -l ${{ github.workspace }}/hdf5
95+
ls -l ${{ github.workspace }}/hdf5_plugins
96+
97+
- name: create hdf5 location (Win)
98+
working-directory: ${{ github.workspace }}/hdf5
99+
run: |
100+
New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory
101+
Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse -Force
102+
Copy-Item -Path "${{ github.workspace }}/hdf5_plugins/h5pl*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse -Force
103+
shell: pwsh
104+
105+
- name: List files for the space (Win)
106+
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5
107+
108+
- name: set hdf5lib name
109+
id: set-hdf5lib-name
110+
run: |
111+
HDF5DIR="${{ github.workspace }}/HDF_Group/HDF5"
112+
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
113+
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
114+
shell: bash
115+
116+
- name: List files for the binaries (Win)
117+
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5
118+
119+
- name: Set Path
120+
run: echo "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin" >> "$GITHUB_PATH"
121+
122+
- name: Set Path (pwsh)
123+
run: |
124+
echo "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
125+
Add-Content $env:GITHUB_PATH "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin"
126+
shell: pwsh
127+
128+
- name: Run ctest (Windows)
129+
env:
130+
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
131+
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
132+
run: |
133+
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDFPLExamples"
134+
cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh
135+
shell: bash
136+
137+
test_binary_linux:
138+
# Linux (Ubuntu) w/ gcc + CMake
139+
#
140+
name: "Ubuntu gcc Binary Test"
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: Install CMake Dependencies (Linux)
144+
run: |
145+
sudo apt-get update
146+
sudo apt-get install ninja-build
147+
148+
- name: Install CMake
149+
uses: jwlawson/actions-setup-cmake@v2
150+
with:
151+
cmake-version: '3.31.6'
152+
153+
- name: Get hdf5 snapshot
154+
if: ${{ (inputs.use_environ == 'snapshots') }}
155+
uses: dsaltares/fetch-gh-release-asset@master
156+
with:
157+
repo: 'HDFGroup/hdf5'
158+
version: 'tags/snapshot'
159+
file: '${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz'
160+
161+
- name: Get hdf5 release
162+
if: ${{ (inputs.use_environ == 'release') }}
163+
uses: dsaltares/fetch-gh-release-asset@master
164+
with:
165+
repo: 'HDFGroup/hdf5'
166+
version: 'tags/${{ inputs.use_hdf }}'
167+
file: '${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz'
168+
169+
- name: Uncompress gh binary (Linux)
170+
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz
171+
172+
- name: Uncompress hdf5 binary (Linux)
173+
run: |
174+
cd "${{ github.workspace }}/hdf5"
175+
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Linux.tar.gz --strip-components 1
176+
177+
# Get files created by cmake-ctest script
178+
- name: Get published plugins binary (Linux)
179+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
180+
with:
181+
name: tgz-ubuntu-2404_gcc-binary
182+
path: ${{ github.workspace }}
183+
184+
- name: Uncompress plugins gh binary (Linux)
185+
run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-ubuntu-2404_gcc.tar.gz
186+
187+
- name: List files for the space (Linux)
188+
run: |
189+
ls -l ${{ github.workspace }}
190+
ls -l ${{ github.workspace }}/hdf5
191+
ls -l ${{ github.workspace }}/hdf5_plugins
192+
193+
- name: Uncompress plugins binary (Linux)
194+
run: |
195+
cd "${{ github.workspace }}/hdf5_plugins"
196+
tar -zxvf ${{ github.workspace }}/hdf5_plugins/h5pl-*-Linux.tar.gz --strip-components 1
197+
198+
- name: List files for the space (Linux)
199+
run: |
200+
ls -l ${{ github.workspace }}
201+
ls -l ${{ github.workspace }}/hdf5
202+
ls -l ${{ github.workspace }}/hdf5/HDF_Group
203+
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
204+
ls -l ${{ github.workspace }}/hdf5_plugins
205+
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group
206+
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5
207+
208+
- name: create hdf5 location (Linux)
209+
working-directory: ${{ github.workspace }}/hdf5
210+
run: |
211+
mkdir -p "${{ github.workspace }}/HDF_Group/HDF5"
212+
cp -r ${{ github.workspace }}/hdf5/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
213+
cp -r ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
214+
215+
- name: List files for the space (Linux)
216+
run: |
217+
ls -l ${{ github.workspace }}/HDF_Group/HDF5
218+
219+
- name: set hdf5lib name
220+
id: set-hdf5lib-name
221+
run: |
222+
HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/
223+
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
224+
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
225+
226+
- name: List files for the space (Linux)
227+
run: |
228+
ls -l ${{ github.workspace }}
229+
ls -l ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
230+
231+
- name: Run ctest (Linux)
232+
env:
233+
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
234+
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
235+
LD_LIBRARY_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/lib;$LD_LIBRARY_PATH
236+
run: |
237+
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDFPLExamples"
238+
cmake --workflow --preset=${{ inputs.preset_name }}-GNUC --fresh
239+
shell: bash
240+
241+
test_binary_mac_latest:
242+
# MacOS w/ Clang + CMake
243+
name: "MacOS Clang Binary Test"
244+
runs-on: macos-latest
245+
steps:
246+
- name: Install Dependencies (MacOS_latest)
247+
run: brew install ninja
248+
249+
- name: Install CMake
250+
uses: jwlawson/actions-setup-cmake@v2
251+
with:
252+
cmake-version: '3.31.6'
253+
254+
- name: Get hdf5 snapshot
255+
if: ${{ (inputs.use_environ == 'snapshots') }}
256+
uses: dsaltares/fetch-gh-release-asset@master
257+
with:
258+
repo: 'HDFGroup/hdf5'
259+
version: 'tags/snapshot'
260+
file: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
261+
262+
- name: Get hdf5 release
263+
if: ${{ (inputs.use_environ == 'release') }}
264+
uses: dsaltares/fetch-gh-release-asset@master
265+
with:
266+
repo: 'HDFGroup/hdf5'
267+
version: 'tags/${{ inputs.use_hdf }}'
268+
file: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
269+
270+
- name: Uncompress gh binary (MacOS_latest)
271+
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-macos14_clang*.tar.gz
272+
273+
- name: Uncompress hdf5 binary (MacOS_latest)
274+
run: |
275+
cd "${{ github.workspace }}/hdf5"
276+
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1
277+
278+
# Get files created by cmake-ctest script
279+
- name: Get published binary (MacOS_latest)
280+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
281+
with:
282+
name: tgz-macos14_clang-binary
283+
path: ${{ github.workspace }}
284+
285+
- name: Uncompress gh binary (MacOS_latest)
286+
run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-macos14_clang.tar.gz
287+
288+
- name: List files for the space (MacOS_latest)
289+
run: |
290+
ls -l ${{ github.workspace }}
291+
ls -l ${{ github.workspace }}/hdf5
292+
ls -l ${{ github.workspace }}/hdf5_plugins
293+
294+
- name: Uncompress plugins binary (MacOS_latest)
295+
run: |
296+
cd "${{ github.workspace }}/hdf5_plugins"
297+
tar -zxvf ${{ github.workspace }}/hdf5_plugins/h5pl-*-Darwin.tar.gz --strip-components 1
298+
299+
- name: List files for the space (MacOS_latest)
300+
run: |
301+
ls -l ${{ github.workspace }}
302+
ls -l ${{ github.workspace }}/hdf5
303+
ls -l ${{ github.workspace }}/hdf5_plugins
304+
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group
305+
306+
- name: create hdf5 location (MacOS_latest)
307+
working-directory: ${{ github.workspace }}/hdf5
308+
run: |
309+
mkdir -p "${{ github.workspace }}/HDF_Group/HDF5"
310+
cp -r ${{ github.workspace }}/hdf5/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
311+
cp -r ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
312+
313+
- name: List files for the space (MacOS_latest)
314+
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5
315+
316+
- name: set hdf5lib name
317+
id: set-hdf5lib-name
318+
run: |
319+
HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/
320+
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
321+
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
322+
323+
- name: List files for the space (MacOS_latest)
324+
run: |
325+
ls -l ${{ github.workspace }}
326+
ls -l ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
327+
328+
- name: Run ctest (MacOS_latest)
329+
id: run-ctest
330+
env:
331+
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
332+
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
333+
DYLD_LIBRARY_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/lib;$DYLD_LIBRARY_PATH
334+
run: |
335+
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDFPLExamples"
336+
cmake --workflow --preset=ci-StdShar-macos-Clang --fresh
337+
shell: bash
338+

.github/workflows/cmake-ctest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
156156
# Get files created by release script
157157
- name: Get zip-tarball (Windows)
158-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
158+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
159159
with:
160160
name: zip-tarball
161161
path: ${{ github.workspace }}
@@ -179,7 +179,7 @@ jobs:
179179
run: |
180180
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\nuget.exe
181181
.\nuget.exe install Microsoft.Windows.SDK.BuildTools -Version 10.0.22621.3233 -x
182-
.\nuget.exe install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x
182+
.\nuget.exe install Microsoft.Trusted.Signing.Client -Version 1.0.86 -x
183183
shell: pwsh
184184
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
185185

@@ -203,7 +203,7 @@ jobs:
203203
shell: bash
204204

205205
- name: Sign files with Trusted Signing
206-
uses: azure/trusted-signing-action@v0.5.0
206+
uses: azure/trusted-signing-action@v0.5.1
207207
with:
208208
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
209209
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -330,7 +330,7 @@ jobs:
330330
331331
# Get files created by release script
332332
- name: Get tgz-tarball (Linux)
333-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
333+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
334334
with:
335335
name: tgz-tarball
336336
path: ${{ github.workspace }}
@@ -496,7 +496,7 @@ jobs:
496496
497497
# Get files created by release script
498498
- name: Get tgz-tarball (MacOS_latest)
499-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
499+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
500500
with:
501501
name: tgz-tarball
502502
path: ${{ github.workspace }}

0 commit comments

Comments
 (0)