-
-
Notifications
You must be signed in to change notification settings - Fork 25
356 lines (301 loc) · 13.2 KB
/
Copy pathcmake-bintest.yml
File metadata and controls
356 lines (301 loc) · 13.2 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
name: hdf5 plugins bintest runs
# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
use_hdf:
description: "The hdf5 base name of the binaries"
required: true
type: string
hdf_tag:
description: "The hdf5 release tag for asset download (version only, without hdf5- prefix)"
required: false
type: string
default: ''
file_base:
description: "The common base name of the source tarballs"
required: true
type: string
preset_name:
description: "The common base name of the preset configuration name to control the build"
required: true
type: string
use_environ:
description: 'Environment to locate files'
type: string
required: true
default: snapshots
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
jobs:
test_binary_win:
# Windows w/ MSVC + CMake
#
name: "Windows MSVC Binary Test"
runs-on: windows-latest
steps:
- name: Install Dependencies (Windows)
run: choco install ninja
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: 'snapshot'
fileName: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
token: ${{ github.token }}
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: '${{ inputs.hdf_tag }}'
fileName: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
token: ${{ github.token }}
- name: Uncompress gh binary (Win)
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip
- name: Uncompress hdf5 binary (Win)
working-directory: ${{ github.workspace }}/hdf5
run: 7z x HDF5-*-win64.zip
shell: bash
# Get files created by cmake-ctest script
- name: Get published plugins binary (Windows)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: zip-vs2022_cl-binary
path: ${{ github.workspace }}/hdf5
- name: Uncompress plugins gh binary (Win)
run: 7z x ${{ github.workspace }}/hdf5/${{ inputs.file_base }}-win-vs2022_cl.zip
- name: List files for the space (Win)
run: |
Get-ChildItem -Path ${{ github.workspace }} -Force
Get-ChildItem -Path ${{ github.workspace }}/hdf5 -Force
Get-ChildItem -Path ${{ github.workspace }}/hdf5_plugins -Force
- name: Uncompress plugins binary (Win)
working-directory: ${{ github.workspace }}/hdf5_plugins
run: 7z x h5pl-*-win64.zip
shell: bash
- name: List files for the space (Win)
run: |
Get-ChildItem -Path ${{ github.workspace }} -Force
Get-ChildItem -Path ${{ github.workspace }}/hdf5 -Force
Get-ChildItem -Path ${{ github.workspace }}/hdf5_plugins -Force
- name: create hdf5 location (Win)
working-directory: ${{ github.workspace }}/hdf5
run: |
New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory
Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse -Force
Copy-Item -Path "${{ github.workspace }}/hdf5_plugins/h5pl*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse -Force
shell: pwsh
- name: List files for the space (Win)
run: Get-ChildItem -Path ${{ github.workspace }}/HDF_Group/HDF5 -Force
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR="${{ github.workspace }}/HDF_Group/HDF5"
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
shell: bash
- name: List files for the binaries (Win)
run: |
Get-ChildItem -Path ${{ github.workspace }}/HDF_Group/HDF5 -Force
Get-ChildItem -Path ${{ github.workspace }}/HDF_Group/HDF5/bin -Recurse -Force
Get-ChildItem -Path ${{ github.workspace }}/HDF_Group/HDF5/lib -Recurse -Force
Get-ChildItem -Path ${{ github.workspace }}/HDF_Group/HDF5/plugin -Recurse -Force
- name: Set Path
run: echo "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin" >> "$GITHUB_PATH"
- name: Set Path (pwsh)
run: |
echo "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Add-Content $env:GITHUB_PATH "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/bin"
shell: pwsh
- name: Run ctest (Windows)
env:
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
run: |
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDFPLExamples"
cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh
shell: bash
test_binary_linux:
# Linux (Ubuntu) w/ gcc + CMake
#
name: "Ubuntu gcc Binary Test"
runs-on: ubuntu-latest
steps:
- name: Install CMake Dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: 'snapshot'
fileName: '${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz'
token: ${{ github.token }}
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: '${{ inputs.hdf_tag }}'
fileName: '${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz'
token: ${{ github.token }}
- name: Uncompress gh binary (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2404_gcc.tar.gz
- name: Uncompress hdf5 binary (Linux)
run: |
cd "${{ github.workspace }}/hdf5"
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Linux.tar.gz --strip-components 1
# Get files created by cmake-ctest script
- name: Get published plugins binary (Linux)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tgz-ubuntu-2404_gcc-binary
path: ${{ github.workspace }}
- name: Uncompress plugins gh binary (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-ubuntu-2404_gcc.tar.gz
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ github.workspace }}/hdf5
ls -l ${{ github.workspace }}/hdf5_plugins
- name: Uncompress plugins binary (Linux)
run: |
cd "${{ github.workspace }}/hdf5_plugins"
tar -zxvf ${{ github.workspace }}/hdf5_plugins/h5pl-*-Linux.tar.gz --strip-components 1
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ github.workspace }}/hdf5
ls -l ${{ github.workspace }}/hdf5/HDF_Group
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
ls -l ${{ github.workspace }}/hdf5_plugins
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5
- name: create hdf5 location (Linux)
working-directory: ${{ github.workspace }}/hdf5
run: |
mkdir -p "${{ github.workspace }}/HDF_Group/HDF5"
cp -r ${{ github.workspace }}/hdf5/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
cp -r ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
- name: Run ctest (Linux)
env:
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
LD_LIBRARY_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/lib;$LD_LIBRARY_PATH
run: |
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDFPLExamples"
cmake --workflow --preset=${{ inputs.preset_name }}-GNUC --fresh
shell: bash
test_binary_mac_latest:
# MacOS w/ Clang + CMake
name: "MacOS Clang Binary Test"
runs-on: macos-latest
steps:
- name: Install Dependencies (MacOS_latest)
run: brew install ninja
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: 'snapshot'
fileName: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
token: ${{ github.token }}
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: robinraju/release-downloader@v1
with:
repository: 'HDFGroup/hdf5'
tag: '${{ inputs.hdf_tag }}'
fileName: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
token: ${{ github.token }}
- name: Uncompress gh binary (MacOS_latest)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-macos14_clang*.tar.gz
- name: Uncompress hdf5 binary (MacOS_latest)
run: |
cd "${{ github.workspace }}/hdf5"
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1
# Get files created by cmake-ctest script
- name: Get published binary (MacOS_latest)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tgz-macos14_clang-binary
path: ${{ github.workspace }}
- name: Uncompress gh binary (MacOS_latest)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.file_base }}-macos14_clang.tar.gz
- name: List files for the space (MacOS_latest)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ github.workspace }}/hdf5
ls -l ${{ github.workspace }}/hdf5_plugins
- name: Uncompress plugins binary (MacOS_latest)
run: |
cd "${{ github.workspace }}/hdf5_plugins"
tar -zxvf ${{ github.workspace }}/hdf5_plugins/h5pl-*-Darwin.tar.gz --strip-components 1
- name: List files for the space (MacOS_latest)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ github.workspace }}/hdf5
ls -l ${{ github.workspace }}/hdf5_plugins
ls -l ${{ github.workspace }}/hdf5_plugins/HDF_Group
- name: create hdf5 location (MacOS_latest)
working-directory: ${{ github.workspace }}/hdf5
run: |
mkdir -p "${{ github.workspace }}/HDF_Group/HDF5"
cp -r ${{ github.workspace }}/hdf5/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
cp -r ${{ github.workspace }}/hdf5_plugins/HDF_Group/HDF5/*/* ${{ github.workspace }}/HDF_Group/HDF5
- name: List files for the space (MacOS_latest)
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/
echo "HDF5_ROOT=$HDF5DIR" >> $GITHUB_OUTPUT
echo "HDF5_PLUGIN_PATH=$HDF5DIR/lib/plugin" >> $GITHUB_OUTPUT
- name: List files for the space (MacOS_latest)
run: |
ls -l ${{ github.workspace }}
ls -l ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
- name: Run ctest (MacOS_latest)
id: run-ctest
env:
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }}
DYLD_LIBRARY_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/lib;$DYLD_LIBRARY_PATH
run: |
cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDFPLExamples"
cmake --workflow --preset=ci-StdShar-macos-Clang --fresh
shell: bash