-
-
Notifications
You must be signed in to change notification settings - Fork 16
654 lines (564 loc) · 22.9 KB
/
ant.yml
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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
name: hdfview ci runs
# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
use_hdf:
description: "The hdf4 tag and base name of the binaries"
required: true
type: string
use_hdf5:
description: "The hdf5 tag name of the binaries"
required: true
type: string
name_hdf5:
description: "The hdf5 base name of the binaries"
required: true
type: string
snap_name:
description: 'The version name of the binaries'
type: string
required: false
default: HDFView-99.99.99
file_base:
description: "The common base name of the source tarballs"
required: true
type: string
use_environ:
description: 'Environment to locate files'
type: string
required: true
default: snapshots
secrets:
APPLE_CERTS_BASE64:
required: true
APPLE_CERTS_BASE64_PASSWD:
required: true
KEYCHAIN_PASSWD:
required: true
AZURE_TENANT_ID:
required: true
AZURE_CLIENT_ID:
required: true
AZURE_CLIENT_SECRET:
required: true
AZURE_ENDPOINT:
required: true
AZURE_CODE_SIGNING_NAME:
required: true
AZURE_CERT_PROFILE_NAME:
required: true
permissions:
contents: read
jobs:
check-secret:
name: Check Secrets exists
runs-on: ubuntu-latest
outputs:
sign-state: ${{ steps.set-signing-state.outputs.BINSIGN }}
steps:
- name: Identify Signing Status
id: set-signing-state
env:
signing_secret: ${{ secrets.AZURE_ENDPOINT }}
run: |
if [[ '${{ env.signing_secret }}' == '' ]]
then
SIGN_VAL=$(echo 'notexists')
else
SIGN_VAL=$(echo 'exists')
fi
echo "BINSIGN=$SIGN_VAL" >> $GITHUB_OUTPUT
shell: bash
- run: echo "signing is ${{ steps.set-signing-state.outputs.BINSIGN }}."
build_and_test_win:
# Windows w/ MSVC + CMake
#
name: "Windows MSVC CTest"
runs-on: windows-latest
needs: [check-secret]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Enable Developer Command Prompt
uses: ilammy/[email protected]
- name: Get hdf4 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
- name: Get hdf4 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
- name: Uncompress gh binary (Win)
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip
- name: Uncompress hdf4 binary (Win)
working-directory: ${{ github.workspace }}/hdf4
run: 7z x HDF-*-win64.zip
shell: bash
- name: List files for the space (Win)
run: |
ls -l ${{ github.workspace }}/hdf4
#ls ${{ runner.workspace }}/hdfview
- name: create hdf4 location (Win)
working-directory: ${{ github.workspace }}/hdf4
run: |
New-Item -Path "${{ github.workspace }}/HDF_Group/HDF" -ItemType Directory
Copy-Item -Path "${{ github.workspace }}/hdf4/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF" -Recurse
shell: pwsh
- name: List files for the space (Win)
run: ls -l ${{ github.workspace }}/HDF_Group/HDF
- name: set hdflib name
id: set-hdflib-name
run: |
HDFDIR="${{ github.workspace }}/HDF_Group/HDF"
echo "HDFLIB_ENV=$HDFDIR" >> $GITHUB_OUTPUT
shell: bash
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-win-vs2022_cl.zip'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot'
file: '${{ inputs.name_hdf5 }}-win-vs2022_cl.zip'
- name: Uncompress gh binary (Win)
run: 7z x ${{ github.workspace }}/${{ inputs.name_hdf5 }}-win-vs2022_cl.zip
- name: Uncompress hdf5 binary (Win)
working-directory: ${{ github.workspace }}/hdf5
run: 7z x HDF5-*-win64.zip
shell: bash
- name: List files for the space (Win)
run: |
ls -l ${{ github.workspace }}/hdf5
#ls ${{ runner.workspace }}/hdfview
- 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
shell: pwsh
- name: List files for the space (Win)
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR="${{ github.workspace }}/HDF_Group/HDF5"
echo "HDF5LIB_ENV=$HDF5DIR" >> $GITHUB_OUTPUT
shell: bash
- name: List files for the binaries (Win)
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: Set file base name (Windows)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash
# Get files created by release script
- name: Get zip-tarball (Windows)
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: zip-tarball
path: ${{ github.workspace }}
- name: using powershell
shell: pwsh
run: Get-Location
- name: List files for the space (Windows)
run: |
Get-ChildItem -Path ${{ github.workspace }}
Get-ChildItem -Path ${{ runner.workspace }}
shell: pwsh
- name: Uncompress source (Windows)
working-directory: ${{ github.workspace }}
run: 7z x ${{ steps.set-file-base.outputs.FILE_BASE }}.zip
shell: bash
- name: Install TrustedSigning (Windows)
run: |
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\nuget.exe
.\nuget.exe install Microsoft.Windows.SDK.BuildTools -Version 10.0.22621.3233 -x
.\nuget.exe install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x
# Install-Module -Name TrustedSigning -RequiredVersion 0.4.1
shell: pwsh
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "credentials.json"
json: '{"Endpoint": "${{ secrets.AZURE_ENDPOINT }}","CodeSigningAccountName": "${{ secrets.AZURE_CODE_SIGNING_NAME }}","CertificateProfileName": "${{ secrets.AZURE_CERT_PROFILE_NAME }}"}'
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
- name: Build with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
BINSIGN: ${{ needs.check-secret.outputs.sign-state }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }}
AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
SIGNTOOLDIR: ${{ github.workspace }}/Microsoft.Windows.SDK.BuildTools/bin/10.0.22621.0/x64
run: |
ant -noinput -buildfile build.xml binaryPackage
shell: bash
- name: Rename snapshot binary base name
id: ren-basename
if: ${{ (inputs.use_environ == 'snapshots') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-win64.zip ${{ steps.set-file-base.outputs.FILE_BASE }}-win64.zip
shell: bash
- name: List files for the space (Windows)
run: |
Get-ChildItem -Path ${{ github.workspace }}/build/dist
Get-ChildItem -Path ${{ github.workspace }}
shell: pwsh
# Save files created by ctest script
- name: Save published binary (Win)
uses: actions/upload-artifact@v4
with:
name: zip-win-vs2022-binary
path: ${{ github.workspace }}/build/dist/${{ steps.set-file-base.outputs.FILE_BASE }}-win64.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'snapshots') }}
# Save release files created by ctest script
- name: Save published release binary (Win)
uses: actions/upload-artifact@v4
with:
name: zip-win-vs2022-binary
path: ${{ github.workspace }}/build/dist/${{ inputs.snap_name }}-win64.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'release') }}
- name: Test with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
run: ant -noinput -buildfile build.xml junit
build_and_test_linux:
# Linux (Ubuntu) w/ gcc + CMake
#
name: "Ubuntu gcc CMake"
runs-on: ubuntu-latest
needs: [check-secret]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Get hdf4 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz'
- name: Get hdf4 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz'
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz
- name: Uncompress hdf4 binary (Linux)
run: |
cd "${{ github.workspace }}/hdf4"
tar -zxvf ${{ github.workspace }}/hdf4/HDF-*-Linux.tar.gz --strip-components 1
- name: set hdflib name
id: set-hdflib-name
run: |
HDFDIR=${{ github.workspace }}/hdf4/HDF_Group/HDF/
FILE_NAME_HDF=$(ls ${{ github.workspace }}/hdf4/HDF_Group/HDF)
echo "HDFLIB_ENV=$HDFDIR$FILE_NAME_HDF" >> $GITHUB_OUTPUT
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-ubuntu-2204_gcc.tar.gz'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot'
file: '${{ inputs.name_hdf5 }}-ubuntu-2204_gcc.tar.gz'
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.name_hdf5 }}-ubuntu-2204_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
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/
FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5)
echo "HDF5LIB_ENV=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT
- name: List files for the binaries (Linux)
run: |
ls -l ${{ github.workspace }}/hdf4/HDF_Group/HDF
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
- name: Set file base name (Linux)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by release script
- name: Get tgz-tarball (Linux)
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: tgz-tarball
path: ${{ github.workspace }}
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress source (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz
- name: Build with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
run: ant -noinput -buildfile build.xml binaryPackage
- name: Rename snapshot binary base name
id: ren-basename
if: ${{ (inputs.use_environ == 'snapshots') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-Linux-x86_64.tar.gz ${{ steps.set-file-base.outputs.FILE_BASE }}-Linux-x86_64.tar.gz
shell: bash
- name: List files in the space (Linux)
run: |
ls ${{ github.workspace }}/build/dist
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published snapshot binary (Linux)
uses: actions/upload-artifact@v4
with:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}/build/dist/${{ steps.set-file-base.outputs.FILE_BASE }}-Linux-x86_64.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'snapshots') }}
- name: Save published release binary (Linux)
uses: actions/upload-artifact@v4
with:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}/build/dist/${{ inputs.snap_name }}-Linux-x86_64.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'release') }}
- name: Test with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
run: ant -noinput -buildfile build.xml junit
build_and_test_mac:
# mac (osx) w/ clang + ant
#
name: "mac clang CMake"
runs-on: macos-latest
needs: [check-secret]
steps:
- uses: actions/checkout@v4
- name: Install the Apple certificate and provisioning profile
shell: bash
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
P12_PASSWORD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_FILE=${{ vars.KEYCHAIN_NAME }}.keychain
# import certificate from secrets
echo $BUILD_CERTIFICATE_BASE64 | base64 --decode > $CERTIFICATE_PATH
security -v create-keychain -p $KEYCHAIN_PASSWD $KEYCHAIN_FILE
security -v list-keychain -d user -s $KEYCHAIN_FILE
security -v list-keychains
security -v set-keychain-settings -lut 21600 $KEYCHAIN_FILE
security -v unlock-keychain -p $KEYCHAIN_PASSWD $KEYCHAIN_FILE
# import certificate to keychain
security -v import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_FILE
security -v set-key-partition-list -S apple-tool:,codesign:,apple: -k $KEYCHAIN_PASSWD $KEYCHAIN_FILE
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Get hdf4 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
- name: Get hdf4 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-macos14_clang.tar.gz'
- name: List files for the space (mac)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (mac)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-macos14_clang*.tar.gz
- name: Uncompress hdf4 binary (mac)
run: |
cd "${{ github.workspace }}/hdf4"
tar -zxvf ${{ github.workspace }}/hdf4/HDF-*-Darwin.tar.gz --strip-components 1
- name: set hdflib name
id: set-hdflib-name
run: |
HDFDIR=${{ github.workspace }}/hdf4/HDF_Group/HDF/
FILE_NAME_HDF=$(ls ${{ github.workspace }}/hdf4/HDF_Group/HDF)
echo "HDFLIB_ENV=$HDFDIR$FILE_NAME_HDF" >> $GITHUB_OUTPUT
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-macos14_clang.tar.gz'
- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot'
file: '${{ inputs.name_hdf5 }}-macos14_clang.tar.gz'
- name: List files for the space (mac)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (mac)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.name_hdf5 }}-macos14_clang*.tar.gz
- name: Uncompress hdf5 binary (mac)
run: |
cd "${{ github.workspace }}/hdf5"
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/
FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5)
echo "HDF5LIB_ENV=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT
- name: List files for the binaries (mac)
run: |
ls -l ${{ github.workspace }}/hdf4/HDF_Group/HDF
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
- name: Set file base name (mac)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by release script
- name: Get tgz-tarball (mac)
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: tgz-tarball
path: ${{ github.workspace }}
- name: List files for the space (mac)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress source (mac)
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz
- name: Build with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
BINSIGN: ${{ needs.check-secret.outputs.sign-state }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
KEYCHAIN_NAME: ${{ vars.KEYCHAIN_NAME }}
SIGNER: ${{ vars.SIGNER }}
NOTARY_USER: ${{ vars.NOTARY_USER }}
NOTARY_KEY: ${{ vars.NOTARY_KEY }}
run: ant -noinput -buildfile build.xml binaryPackage
- name: Rename snapshot binary base name
id: ren-basename
if: ${{ (inputs.use_environ == 'snapshots') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-Darwin.tar.gz ${{ steps.set-file-base.outputs.FILE_BASE }}-Darwin.tar.gz
shell: bash
- name: List files in the space (mac)
run: |
ls ${{ github.workspace }}/build/dist
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published snapshot binary (mac)
uses: actions/upload-artifact@v4
with:
name: tgz-macos14_clang-binary
path: ${{ github.workspace }}/build/dist/${{ steps.set-file-base.outputs.FILE_BASE }}-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'snapshots') }}
# Save release files created by ctest script
- name: Save published release binary (mac)
uses: actions/upload-artifact@v4
with:
name: tgz-macos14_clang-binary
path: ${{ github.workspace }}/build/dist/${{ inputs.snap_name }}-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'release') }}
- name: Test with Ant
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
run: ant -noinput -buildfile build.xml junit