Skip to content

Commit 33f4344

Browse files
committed
CI Yaml: use anchors to dedupe, and latest actions, add HDF5 2.1.1
1 parent 38819c2 commit 33f4344

3 files changed

Lines changed: 44 additions & 70 deletions

File tree

.github/workflows/run_tests_docker.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
on: [pull_request,workflow_dispatch]
88

9-
concurrency:
10-
group: ${{ github.workflow}}-${{ github.head_ref }}
9+
concurrency:
10+
group: ${{ github.workflow}}-${{ github.head_ref }}
1111
cancel-in-progress: true
1212

13-
permissions: {}
13+
permissions: {}
1414

15-
jobs:
15+
jobs:
1616
netcdf-tests-serial:
1717
name: Docker-Based NetCDF-C, Fortran Regression Testing (Serial)
1818
runs-on: ubuntu-latest
@@ -25,7 +25,8 @@ jobs:
2525
buildsystem: [ 'both' ]
2626

2727
steps:
28-
- uses: actions/checkout@v4
28+
- &checkout
29+
uses: actions/checkout@v6
2930
- name: Pull and Run netCDF Regression Tests
3031
uses: Unidata/netcdf-test-action@v2
3132
with:
@@ -53,7 +54,7 @@ jobs:
5354
buildsystem: [ 'cmake', 'autotools' ]
5455

5556
steps:
56-
- uses: actions/checkout@v4
57+
- *checkout
5758
- name: Pull and Run netCDF Regression Tests
5859
uses: Unidata/netcdf-test-action@v2
5960
with:
@@ -65,4 +66,3 @@ jobs:
6566
c-compiler: '${{ matrix.c-compiler }}'
6667
c-branch: '${{ matrix.c-branch }}'
6768
run-fortran: 'TRUE'
68-

.github/workflows/run_tests_linux.yml

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323

2424
steps:
2525

26-
- uses: actions/checkout@v4
26+
- &checkout
27+
uses: actions/checkout@v6
2728

2829
- name: Install System dependencies
2930
shell: bash -l {0}
@@ -39,9 +40,10 @@ jobs:
3940
###
4041
# Installing libhdf4 and libhdf5
4142
###
42-
- name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
43+
- &hdf5-cache
44+
name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
4345
id: cache-hdf5
44-
uses: actions/cache@v4
46+
uses: actions/cache@v5
4547
with:
4648
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
4749
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
@@ -79,7 +81,7 @@ jobs:
7981

8082
steps:
8183

82-
- uses: actions/checkout@v4
84+
- *checkout
8385

8486
- name: Install System dependencies
8587
shell: bash -l {0}
@@ -96,9 +98,10 @@ jobs:
9698
###
9799
# Installing libhdf4 and libhdf5
98100
###
99-
- name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par
101+
- &hdf5-cache-par
102+
name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par
100103
id: cache-hdf5-par
101-
uses: actions/cache@v4
104+
uses: actions/cache@v5
102105
with:
103106
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
104107
key: hdf5-nc-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par
@@ -138,7 +141,7 @@ jobs:
138141

139142
steps:
140143

141-
- uses: actions/checkout@v4
144+
- *checkout
142145

143146
- name: Install System dependencies
144147
shell: bash -l {0}
@@ -158,16 +161,12 @@ jobs:
158161
# Fetch Cache
159162
###
160163

161-
- name: Fetch HDF Cache
162-
id: cache-hdf
163-
uses: actions/cache@v4
164-
with:
165-
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
166-
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
164+
- *hdf5-cache
167165

168-
- name: Check Cache
166+
- &hdf5-cache-check
167+
name: Check Cache
169168
shell: bash -l {0}
170-
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf}}/lib
169+
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib
171170

172171
###
173172
# Configure and build
@@ -185,7 +184,7 @@ jobs:
185184
make -j install
186185
popd
187186
popd
188-
if: ${{ matrix.netcdf }} == "main"
187+
if: matrix.netcdf == 'main'
189188

190189
- name: Run autoconf
191190
shell: bash -l {0}
@@ -235,7 +234,7 @@ jobs:
235234

236235
steps:
237236

238-
- uses: actions/checkout@v4
237+
- *checkout
239238

240239
- name: Install System dependencies
241240
shell: bash -l {0}
@@ -256,16 +255,9 @@ jobs:
256255
# Fetch Cache
257256
###
258257

259-
- name: Fetch HDF Cache
260-
id: cache-hdf-par
261-
uses: actions/cache@v4
262-
with:
263-
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
264-
key: hdf5-nc-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par
258+
- *hdf5-cache-par
265259

266-
- name: Check Cache
267-
shell: bash -l {0}
268-
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf}}/lib
260+
- *hdf5-cache-check
269261

270262
###
271263
# Configure and build
@@ -283,7 +275,7 @@ jobs:
283275
make -j install
284276
popd
285277
popd
286-
if: ${{ matrix.netcdf }} == "main"
278+
if: matrix.netcdf == 'main'
287279

288280
- name: Run autoconf
289281
shell: bash -l {0}
@@ -322,7 +314,7 @@ jobs:
322314
run: |
323315
echo -e "\n\n\to NPROC: $(nproc)\n\n"
324316
find . -name "test-suite.log" -exec cat {} \;
325-
if: ${{ failure() }}
317+
if: ${{ failure() }}
326318

327319
#- name: Make Distcheck
328320
# shell: bash -l {0}
@@ -335,12 +327,12 @@ jobs:
335327

336328
strategy:
337329
matrix:
338-
hdf5: [ 1.12.2 ]
330+
hdf5: [ "1.12.2", "2.1.1" ]
339331
netcdf: [ v4.9.3 ]
340332

341333
steps:
342334

343-
- uses: actions/checkout@v4
335+
- *checkout
344336

345337
- name: Install System dependencies
346338
shell: bash -l {0}
@@ -361,17 +353,9 @@ jobs:
361353
# Fetch Cache
362354
###
363355

364-
- name: Fetch HDF Cache
365-
id: cache-hdf5
366-
uses: actions/cache@v4
367-
with:
368-
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
369-
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
370-
371-
- name: Check Cache
372-
shell: bash -l {0}
373-
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{matrix.netcdf}}/lib
356+
- *hdf5-cache
374357

358+
- *hdf5-cache-check
375359
###
376360
# Configure and build
377361
###
@@ -388,7 +372,7 @@ jobs:
388372
make -j install
389373
popd
390374
popd
391-
if: ${{ matrix.netcdf }} == "main"
375+
if: matrix.netcdf == 'main'
392376

393377
- name: Perform out-of-directory build
394378
shell: bash -l {0}

.github/workflows/run_tests_macos.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
build-deps:
1616

17-
runs-on: macos-11
17+
runs-on: macos-15
1818

1919
strategy:
2020
matrix:
@@ -23,7 +23,8 @@ jobs:
2323

2424
steps:
2525

26-
- uses: actions/checkout@v4
26+
- &checkout
27+
uses: actions/checkout@v6
2728

2829
###
2930
# Set Environmental Variables
@@ -42,9 +43,10 @@ jobs:
4243
###
4344
# Installing libhdf4 and libhdf5
4445
###
45-
- name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
46+
- &hdf5-cache
47+
name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
4648
id: cache-hdf5
47-
uses: actions/cache@v4
49+
uses: actions/cache@v5
4850
with:
4951
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
5052
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
@@ -83,7 +85,7 @@ jobs:
8385

8486
steps:
8587

86-
- uses: actions/checkout@v4
88+
- *checkout
8789
###
8890
# Set Environmental Variables
8991
###
@@ -105,14 +107,10 @@ jobs:
105107
# Fetch Cache
106108
###
107109

108-
- name: Fetch HDF Cache
109-
id: cache-hdf
110-
uses: actions/cache@v4
111-
with:
112-
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
113-
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
110+
- *hdf5-cache
114111

115-
- name: Check Cache
112+
- &hdf5-cache-check
113+
name: Check Cache
116114
shell: bash -l {0}
117115
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf}}/lib
118116

@@ -188,17 +186,9 @@ jobs:
188186
# Fetch Cache
189187
###
190188

191-
- name: Fetch HDF Cache
192-
id: cache-hdf5
193-
uses: actions/cache@v4
194-
with:
195-
path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}
196-
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}
197-
198-
- name: Check Cache
199-
shell: bash -l {0}
200-
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} && ls ${HOME}/environments/${{ matrix.hdf5 }}-${{matrix.netcdf}}/lib
189+
- *hdf5-cache
201190

191+
- *hdf5-cache-check
202192
###
203193
# Configure and build
204194
###

0 commit comments

Comments
 (0)