Skip to content

Commit

Permalink
Merge pull request #750 from byrnHDF/master-mac-ci
Browse files Browse the repository at this point in the history
Add mac notarization
  • Loading branch information
byrnHDF authored Aug 26, 2024
2 parents 8012a70 + 1c8d0e9 commit 64c8c39
Show file tree
Hide file tree
Showing 6 changed files with 495 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,6 @@ jobs:
HDF4_ROOT: ${{ steps.set-hdf4lib-name.outputs.HDF4_ROOT }}
run: |
cd "${{ steps.set-hdf4lib-name.outputs.HDF4_ROOT }}/share/HDF4Examples"
cmake --workflow --preset=ci-StdShar-MACOS-Clang --fresh
cmake --workflow --preset=ci-StdShar-macos-Clang --fresh
shell: bash

27 changes: 20 additions & 7 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ jobs:
id: run-ctest
run: |
cd "${{ runner.workspace }}/hdf4/${{ steps.set-file-base.outputs.SOURCE_BASE }}"
cmake --workflow --preset=${{ inputs.preset_name }}-MACOS-Clang --fresh
cmake --workflow --preset=${{ inputs.preset_name }}-macos-Clang --fresh
shell: bash

- name: Sign dmg (MacOS_latest)
Expand All @@ -406,7 +406,7 @@ jobs:
NOTARY_USER: ${{ vars.NOTARY_USER }}
NOTARY_KEY: ${{ vars.NOTARY_KEY }}
run: |
/usr/bin/codesign --force --timestamp --options runtime --verbose=4 --strict --sign ${{ env.SIGNER }} --deep ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/*.dmg
/usr/bin/codesign --force --timestamp --options runtime --verbose=4 --strict --sign ${{ env.SIGNER }} --deep ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/*.dmg
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
shell: bash

Expand All @@ -419,7 +419,20 @@ jobs:
NOTARY_USER: ${{ vars.NOTARY_USER }}
NOTARY_KEY: ${{ vars.NOTARY_KEY }}
run: |
/usr/bin/xcrun notarytool submit --wait --output-format json --apple-id ${{ env.NOTARY_USER }} --password ${{ env.NOTARY_KEY }} --team-id ${{ env.SIGNER }} ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/*.dmg
echo /usr/bin/xcrun notarytool submit --wait --output-format json --apple-id ${{ env.NOTARY_USER }} --password ${{ env.NOTARY_KEY }} --team-id ${{ env.SIGNER }} ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/*.dmg
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
shell: bash

- name: Staple dmg (MacOS_latest)
id: staple-dmg
env:
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
KEYCHAIN_NAME: ${{ vars.KEYCHAIN_NAME }}
SIGNER: ${{ vars.SIGNER }}
NOTARY_USER: ${{ vars.NOTARY_USER }}
NOTARY_KEY: ${{ vars.NOTARY_KEY }}
run: |
/usr/bin/xcrun stapler staple${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/*.dmg
if: ${{ needs.check-secret.outputs.sign-state == 'exists' }}
shell: bash

Expand All @@ -429,8 +442,8 @@ jobs:
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf4"
cp ${{ runner.workspace }}/hdf4/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/README.txt ${{ runner.workspace }}/build/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/README.txt ${{ runner.workspace }}/build/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf4
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-macos14_clang.tar.gz hdf4
shell: bash
Expand All @@ -441,8 +454,8 @@ jobs:
mkdir "${{ runner.workspace }}/builddmg"
mkdir "${{ runner.workspace }}/builddmg/hdf4"
cp ${{ runner.workspace }}/hdf4/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/builddmg/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/README.txt ${{ runner.workspace }}/builddmg/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/*.dmg ${{ runner.workspace }}/builddmg/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/README.txt ${{ runner.workspace }}/builddmg/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-macos-Clang/*.dmg ${{ runner.workspace }}/builddmg/hdf4
cd "${{ runner.workspace }}/builddmg"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-macos14_clang.dmg.tar.gz hdf4
shell: bash
Expand Down
97 changes: 78 additions & 19 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"},
"ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.3"},
"ZLIB_TGZ_NAME": {"type": "STRING", "value": "zlib-1.3.tar.gz"},
"ZLIBNG_PACKAGE_NAME": {"type": "STRING", "value": "zlib-ng"},
"ZLIBNG_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/zlib-ng/zlib-ng/archive/refs/tags"},
"ZLIBNG_TGZ_NAME": {"type": "STRING", "value": "2.1.6.tar.gz"},
"LIBAEC_PACKAGE_NAME": {"type": "STRING", "value": "libaec"},
"LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3"},
"LIBAEC_TGZ_NAME": {"type": "STRING", "value": "libaec-1.1.3.tar.gz"}
Expand Down Expand Up @@ -88,6 +91,24 @@
"ci-StdShar"
]
},
{
"name": "ci-StdShar-macos-Clang",
"description": "Clang Standard Config for macos (Release)",
"inherits": [
"ci-macos-Release-Clang",
"ci-Java",
"ci-StdShar"
]
},
{
"name": "ci-StdShar-macos-GNUC",
"description": "GNUC Standard Config for macos (Release)",
"inherits": [
"ci-macos-Release-GNUC",
"ci-Java",
"ci-StdShar"
]
},
{
"name": "ci-StdShar-Clang-Fortran",
"description": "Clang Standard Fortran Config for x64 (Release)",
Expand Down Expand Up @@ -144,18 +165,35 @@
]
},
{
"name": "ci-StdShar-GNUC-Fortran",
"description": "GNUC Standard Fortran Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC-Fortran",
"name": "ci-StdShar-GNUC",
"description": "GNUC Standard Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC",
"verbose": true,
"inherits": [
"ci-x64-Release-GNUC"
]
},
{
"name": "ci-StdShar-GNUC",
"description": "GNUC Standard Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC",
"name": "ci-StdShar-macos-Clang",
"description": "Clang Standard Build for macos (Release)",
"configurePreset": "ci-StdShar-macos-Clang",
"inherits": [
"ci-macos-Release-Clang"
]
},
{
"name": "ci-StdShar-macos-GNUC",
"description": "GNUC Standard Build for macos (Release)",
"configurePreset": "ci-StdShar-macos-GNUC",
"verbose": true,
"inherits": [
"ci-macos-Release-GNUC"
]
},
{
"name": "ci-StdShar-GNUC-Fortran",
"description": "GNUC Standard Fortran Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC-Fortran",
"verbose": true,
"inherits": [
"ci-x64-Release-GNUC"
Expand Down Expand Up @@ -194,22 +232,24 @@
]
},
{
"name": "ci-StdShar-MACOS-Clang",
"configurePreset": "ci-StdShar-Clang",
"name": "ci-StdShar-macos-Clang",
"configurePreset": "ci-StdShar-macos-Clang",
"inherits": [
"ci-x64-Release-Clang"
"ci-macos-Release-Clang"
],
"execution": {
"noTestsAction": "error",
"timeout": 180,
"jobs": 2
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "ci-StdShar-macos-GNUC",
"configurePreset": "ci-StdShar-macos-GNUC",
"inherits": [
"ci-macos-Release-GNUC"
]
},
{
"name": "ci-StdShar-GNUC",
"configurePreset": "ci-StdShar-GNUC",
Expand Down Expand Up @@ -265,6 +305,16 @@
"configurePreset": "ci-StdShar-GNUC",
"inherits": "ci-x64-Release-GNUC"
},
{
"name": "ci-StdShar-macos-Clang",
"configurePreset": "ci-StdShar-macos-Clang",
"inherits": "ci-macos-Release-Clang"
},
{
"name": "ci-StdShar-macos-GNUC",
"configurePreset": "ci-StdShar-macos-GNUC",
"inherits": "ci-macos-Release-GNUC"
},
{
"name": "ci-StdShar-GNUC-Fortran",
"configurePreset": "ci-StdShar-GNUC-Fortran",
Expand Down Expand Up @@ -305,12 +355,12 @@
]
},
{
"name": "ci-StdShar-MACOS-Clang",
"name": "ci-StdShar-macos-Clang",
"steps": [
{"type": "configure", "name": "ci-StdShar-Clang"},
{"type": "build", "name": "ci-StdShar-Clang"},
{"type": "test", "name": "ci-StdShar-MACOS-Clang"},
{"type": "package", "name": "ci-StdShar-Clang"}
{"type": "configure", "name": "ci-StdShar-macos-Clang"},
{"type": "build", "name": "ci-StdShar-macos-Clang"},
{"type": "test", "name": "ci-StdShar-macos-Clang"},
{"type": "package", "name": "ci-StdShar-macos-Clang"}
]
},
{
Expand All @@ -322,6 +372,15 @@
{"type": "package", "name": "ci-StdShar-GNUC"}
]
},
{
"name": "ci-StdShar-macos-GNUC",
"steps": [
{"type": "configure", "name": "ci-StdShar-macos-GNUC"},
{"type": "build", "name": "ci-StdShar-macos-GNUC"},
{"type": "test", "name": "ci-StdShar-macos-GNUC"},
{"type": "package", "name": "ci-StdShar-macos-GNUC"}
]
},
{
"name": "ci-StdShar-GNUC-Fortran",
"steps": [
Expand Down
69 changes: 57 additions & 12 deletions HDF4Examples/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@
"ci-StdShar"
]
},
{
"name": "ci-StdShar-macos-Clang",
"description": "Clang Standard Config for macos (Release)",
"inherits": [
"ci-macos-Release-Clang",
"ci-StdJava",
"ci-StdShar"
]
},
{
"name": "ci-StdShar-macos-GNUC",
"description": "GNUC Standard Config for macos (Release)",
"inherits": [
"ci-macos-Release-GNUC",
"ci-StdJava",
"ci-StdShar"
]
},
{
"name": "ci-StdShar-Intel",
"description": "Intel Standard Config for x64 (Release)",
Expand Down Expand Up @@ -100,6 +118,23 @@
"ci-x64-Release-GNUC"
]
},
{
"name": "ci-StdShar-macos-Clang",
"description": "Clang Standard Build for macos (Release)",
"configurePreset": "ci-StdShar-macos-Clang",
"inherits": [
"ci-macos-Release-Clang"
]
},
{
"name": "ci-StdShar-macos-GNUC",
"description": "GNUC Standard Build for macos (Release)",
"configurePreset": "ci-StdShar-macos-GNUC",
"verbose": true,
"inherits": [
"ci-macos-Release-GNUC"
]
},
{
"name": "ci-StdShar-Intel",
"description": "Intel Standard Build for x64 (Release)",
Expand All @@ -126,22 +161,24 @@
]
},
{
"name": "ci-StdShar-MACOS-Clang",
"configurePreset": "ci-StdShar-Clang",
"name": "ci-StdShar-macos-Clang",
"configurePreset": "ci-StdShar-macos-Clang",
"inherits": [
"ci-x64-Release-Clang"
"ci-macos-Release-Clang"
],
"execution": {
"noTestsAction": "error",
"timeout": 180,
"jobs": 2
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "ci-StdShar-macos-GNUC",
"configurePreset": "ci-StdShar-macos-GNUC",
"inherits": [
"ci-macos-Release-GNUC"
]
},
{
"name": "ci-StdShar-GNUC",
"configurePreset": "ci-StdShar-GNUC",
Expand Down Expand Up @@ -187,11 +224,11 @@
]
},
{
"name": "ci-StdShar-MACOS-Clang",
"name": "ci-StdShar-macos-Clang",
"steps": [
{"type": "configure", "name": "ci-StdShar-Clang"},
{"type": "build", "name": "ci-StdShar-Clang"},
{"type": "test", "name": "ci-StdShar-MACOS-Clang"}
{"type": "configure", "name": "ci-StdShar-macos-Clang"},
{"type": "build", "name": "ci-StdShar-macos-Clang"},
{"type": "test", "name": "ci-StdShar-macos-Clang"}
]
},
{
Expand All @@ -202,6 +239,14 @@
{"type": "test", "name": "ci-StdShar-GNUC"}
]
},
{
"name": "ci-StdShar-macos-GNUC",
"steps": [
{"type": "configure", "name": "ci-StdShar-macos-GNUC"},
{"type": "build", "name": "ci-StdShar-macos-GNUC"},
{"type": "test", "name": "ci-StdShar-macos-GNUC"}
]
},
{
"name": "ci-StdShar-Intel",
"steps": [
Expand Down
Loading

0 comments on commit 64c8c39

Please sign in to comment.