From 44325a22e639a40e146fb5bf803e9fc6b91c3e4d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 23 Aug 2024 08:15:31 -0500 Subject: [PATCH 1/4] Specify macos presets to create universal binaries --- .github/workflows/cmake-bintest.yml | 2 +- .github/workflows/cmake-ctest.yml | 2 +- CMakePresets.json | 97 ++++++-- HDF4Examples/CMakePresets.json | 69 +++++- .../config/cmake-presets/hidden-presets.json | 213 ++++++++++++++++-- config/cmake-presets/hidden-presets.json | 170 +++++++++++--- 6 files changed, 479 insertions(+), 74 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index f673db12b1..5e87337603 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -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 diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 9fc8a73ea7..e128f4f0b5 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -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) diff --git a/CMakePresets.json b/CMakePresets.json index 900f194a3e..df23f82ec2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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"} @@ -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)", @@ -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" @@ -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", @@ -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", @@ -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"} ] }, { @@ -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": [ diff --git a/HDF4Examples/CMakePresets.json b/HDF4Examples/CMakePresets.json index 396f42bb48..cfbf20572c 100644 --- a/HDF4Examples/CMakePresets.json +++ b/HDF4Examples/CMakePresets.json @@ -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)", @@ -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)", @@ -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", @@ -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"} ] }, { @@ -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": [ diff --git a/HDF4Examples/config/cmake-presets/hidden-presets.json b/HDF4Examples/config/cmake-presets/hidden-presets.json index 73cefdd5cf..66f70369c4 100644 --- a/HDF4Examples/config/cmake-presets/hidden-presets.json +++ b/HDF4Examples/config/cmake-presets/hidden-presets.json @@ -13,7 +13,7 @@ "binaryDir": "${sourceParentDir}/build/${presetName}", "installDir": "${sourceParentDir}/install/${presetName}" }, - { + { "name": "ci-x64", "architecture": { "value": "x64", @@ -24,7 +24,15 @@ { "name": "ci-x86", "architecture": { - "value": "x86", + "value": "Win32", + "strategy": "external" + }, + "hidden": true + }, + { + "name": "ci-arm64", + "architecture": { + "value": "ARM64", "strategy": "external" }, "hidden": true @@ -50,25 +58,29 @@ "CMAKE_C_COMPILER": "cl", "CMAKE_CXX_COMPILER": "cl" }, - "toolset": { - "value": "host=x64", - "strategy": "external" - }, "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" } }, + { + "name": "ci-macos", + "hidden": true, + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64" + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + } + }, { "name": "ci-Clang", "hidden": true, "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "config/toolchain/clang.cmake" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { @@ -81,14 +93,14 @@ "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { "name": "ci-Intel", + "hidden": true + }, + { + "name": "ci-Fortran", "hidden": true, "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "config/toolchain/intel.cmake" @@ -98,6 +110,13 @@ "strategy": "external" } }, + { + "name": "ci-Java", + "hidden": true, + "cacheVariables": { + "HDF_BUILD_JAVA": "ON" + } + }, { "name": "ci-x64-Debug-MSVC", "description": "MSVC for x64 (Debug)", @@ -164,6 +183,50 @@ "ci-GNUC" ] }, + { + "name": "ci-macos-Debug-Clang", + "description": "Clang/LLVM for x64 (Debug)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Debug", + "ci-Clang" + ] + }, + { + "name": "ci-macos-Release-Clang", + "description": "Clang/LLVM for x64 (Release)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Release", + "ci-Clang" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "description": "GNUC for x64 (Debug)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Debug", + "ci-GNUC" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "description": "GNUC for x64 (Release)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Release", + "ci-GNUC" + ] + }, { "name": "ci-x64-Debug-Intel", "description": "Intel for x64 (Debug)", @@ -185,6 +248,52 @@ "ci-Release", "ci-Intel" ] + }, + { + "name": "ci-x64-Debug-MSVC-asan", + "description": "x64-Debug-MSVC with /fsanitize=address", + "hidden": true, + "inherits": "ci-x64-Debug-MSVC", + "cacheVariables": { + "USE_SANITIZER": "Address", + "HDF4_ENABLE_SANITIZERS": "ON" + } + }, + { + "name": "ci-x64-Debug-GNUC-asan", + "hidden": true, + "inherits": "ci-x64-Debug-GNUC", + "cacheVariables": { + "USE_SANITIZER": "Address", + "HDF4_ENABLE_SANITIZERS": "ON" + } + }, + { + "name": "ci-x64-Debug-GNUC-tsan", + "hidden": true, + "inherits": "ci-x64-Debug-GNUC", + "cacheVariables": { + "USE_SANITIZER": "Thread", + "HDF4_ENABLE_SANITIZERS": "ON" + } + }, + { + "name": "ci-x64-Debug-GNUC-lsan", + "hidden": true, + "inherits": "ci-x64-Debug-GNUC", + "cacheVariables": { + "USE_SANITIZER": "Leak", + "HDF4_ENABLE_SANITIZERS": "ON" + } + }, + { + "name": "ci-x64-Debug-GNUC-ubsan", + "hidden": true, + "inherits": "ci-x64-Debug-GNUC", + "cacheVariables": { + "USE_SANITIZER": "Undefined", + "HDF4_ENABLE_SANITIZERS": "ON" + } } ], "buildPresets": [ @@ -245,6 +354,38 @@ "ci-base" ] }, + { + "name": "ci-macos-Debug-Clang", + "configurePreset": "ci-macos-Debug-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "configurePreset": "ci-macos-Debug-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, { "name": "ci-x64-Debug-Intel", "configurePreset": "ci-x64-Debug-Intel", @@ -330,6 +471,38 @@ "ci-base" ] }, + { + "name": "ci-macos-Debug-Clang", + "configurePreset": "ci-macos-Debug-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "configurePreset": "ci-macos-Debug-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, { "name": "ci-x64-Debug-Intel", "configurePreset": "ci-x64-Debug-Intel", @@ -374,6 +547,18 @@ "hidden": true, "inherits": "ci-base" }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": "ci-base" + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": "ci-base" + }, { "name": "ci-x64-Release-Intel", "configurePreset": "ci-x64-Release-Intel", diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json index c27209a8cf..474afee6d2 100644 --- a/config/cmake-presets/hidden-presets.json +++ b/config/cmake-presets/hidden-presets.json @@ -10,7 +10,7 @@ "binaryDir": "${sourceParentDir}/build/${presetName}", "installDir": "${sourceParentDir}/install/${presetName}" }, - { + { "name": "ci-x64", "architecture": { "value": "x64", @@ -21,7 +21,15 @@ { "name": "ci-x86", "architecture": { - "value": "x86", + "value": "Win32", + "strategy": "external" + }, + "hidden": true + }, + { + "name": "ci-arm64", + "architecture": { + "value": "ARM64", "strategy": "external" }, "hidden": true @@ -48,25 +56,29 @@ "CMAKE_C_COMPILER": "cl", "CMAKE_CXX_COMPILER": "cl" }, - "toolset": { - "value": "host=x64", - "strategy": "external" - }, "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" } }, + { + "name": "ci-macos", + "hidden": true, + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64" + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + } + }, { "name": "ci-Clang", "hidden": true, "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "config/toolchain/clang.cmake" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { @@ -79,29 +91,17 @@ "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { "name": "ci-Intel", - "hidden": true, - "toolset": { - "value": "host=x64", - "strategy": "external" - } + "hidden": true }, { "name": "ci-Fortran", "hidden": true, "cacheVariables": { "HDF4_BUILD_FORTRAN": "ON" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { @@ -122,10 +122,6 @@ "hidden": true, "cacheVariables": { "HDF4_BUILD_JAVA": "ON" - }, - "toolset": { - "value": "host=x64", - "strategy": "external" } }, { @@ -194,6 +190,50 @@ "ci-GNUC" ] }, + { + "name": "ci-macos-Debug-Clang", + "description": "Clang/LLVM for x64 (Debug)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Debug", + "ci-Clang" + ] + }, + { + "name": "ci-macos-Release-Clang", + "description": "Clang/LLVM for x64 (Release)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Release", + "ci-Clang" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "description": "GNUC for x64 (Debug)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Debug", + "ci-GNUC" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "description": "GNUC for x64 (Release)", + "hidden": true, + "inherits": [ + "ci-base", + "ci-macos", + "ci-Release", + "ci-GNUC" + ] + }, { "name": "ci-x64-Debug-Intel", "description": "Intel for x64 (Debug)", @@ -321,6 +361,38 @@ "ci-base" ] }, + { + "name": "ci-macos-Debug-Clang", + "configurePreset": "ci-macos-Debug-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "configurePreset": "ci-macos-Debug-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, { "name": "ci-x64-Debug-Intel", "configurePreset": "ci-x64-Debug-Intel", @@ -446,6 +518,38 @@ "ci-base" ] }, + { + "name": "ci-macos-Debug-Clang", + "configurePreset": "ci-macos-Debug-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Debug-GNUC", + "configurePreset": "ci-macos-Debug-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": [ + "ci-base" + ] + }, { "name": "ci-x64-Debug-Intel", "configurePreset": "ci-x64-Debug-Intel", @@ -529,6 +633,18 @@ "hidden": true, "inherits": "ci-base" }, + { + "name": "ci-macos-Release-Clang", + "configurePreset": "ci-macos-Release-Clang", + "hidden": true, + "inherits": "ci-base" + }, + { + "name": "ci-macos-Release-GNUC", + "configurePreset": "ci-macos-Release-GNUC", + "hidden": true, + "inherits": "ci-base" + }, { "name": "ci-x64-Release-Intel", "configurePreset": "ci-x64-Release-Intel", From f2de7f66f901ab8622902d28dfa578866a5c2cff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 23 Aug 2024 08:41:10 -0500 Subject: [PATCH 2/4] Use correct path names --- .github/workflows/cmake-ctest.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index e128f4f0b5..7bffbc1b4d 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -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 @@ -419,7 +419,7 @@ 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 + /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 @@ -429,8 +429,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 @@ -441,8 +441,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 From 3ae838e0ac3ca2e5bbc0efb7a76f79392a0928cd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 23 Aug 2024 10:35:38 -0500 Subject: [PATCH 3/4] Use default architecture for examples --- HDF4Examples/config/cmake-presets/hidden-presets.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/HDF4Examples/config/cmake-presets/hidden-presets.json b/HDF4Examples/config/cmake-presets/hidden-presets.json index 66f70369c4..dc8ecaa9f4 100644 --- a/HDF4Examples/config/cmake-presets/hidden-presets.json +++ b/HDF4Examples/config/cmake-presets/hidden-presets.json @@ -67,9 +67,6 @@ { "name": "ci-macos", "hidden": true, - "cacheVariables": { - "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64" - }, "condition": { "type": "equals", "lhs": "${hostSystemName}", From 1c8d0e9727a128d4353f801b20056fa4f8dc3261 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 26 Aug 2024 07:49:28 -0500 Subject: [PATCH 4/4] staple notary --- .github/workflows/cmake-ctest.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 7bffbc1b4d..abb4aa209a 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -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 }}-macos-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