From ce00fe3871ed707eb36d212e2902c66efde3faa4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 4 Feb 2024 10:17:36 -0600 Subject: [PATCH 1/3] Make platform specific test presets for windows and macs --- .github/workflows/cmake-bintest.yml | 2 +- .github/workflows/cmake-ctest.yml | 8 ++--- CMakePresets.json | 50 +++++++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index fb02bcefa88..d78b6504026 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -214,6 +214,6 @@ jobs: HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} run: | cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDF5Examples" - cmake --workflow --preset=ci-StdShar-Clang --fresh + cmake --workflow --preset=ci-StdShar-OSX-Clang --fresh shell: bash diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index ec694155abc..362cca4956d 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -220,7 +220,7 @@ jobs: id: run-ctest run: | cd "${{ runner.workspace }}/hdf5/hdfsrc" - cmake --workflow --preset=${{ inputs.preset_name }}-Clang --fresh + cmake --workflow --preset=${{ inputs.preset_name }}-OSX-Clang --fresh shell: bash - name: Publish binary (MacOS) @@ -231,7 +231,7 @@ jobs: cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5 cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5 cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5 + cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-OSX-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5 cd "${{ runner.workspace }}/build" tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf5 shell: bash @@ -369,7 +369,7 @@ jobs: CXX: ${{ steps.setup-fortran.outputs.cxx }} run: | cd "${{ runner.workspace }}/hdf5/hdfsrc" - cmake --workflow --preset=${{ inputs.preset_name }}-Intel --fresh + cmake --workflow --preset=${{ inputs.preset_name }}-win-Intel --fresh shell: pwsh - name: Publish binary (Windows_intel) @@ -380,7 +380,7 @@ jobs: Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING -Destination ${{ runner.workspace }}/build/hdf5/ Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/ Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/README.md -Destination ${{ runner.workspace }}/build/hdf5/ - Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip + Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-win-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip cd "${{ runner.workspace }}/build" 7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip hdf5 shell: pwsh diff --git a/CMakePresets.json b/CMakePresets.json index 65c56d7a831..61afadd7b92 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -242,6 +242,23 @@ "ci-x64-Release-Clang" ] }, + { + "name": "ci-StdShar-OSX-Clang", + "configurePreset": "ci-StdShar-Clang", + "inherits": [ + "ci-x64-Release-Clang" + ], + "execution": { + "noTestsAction": "error", + "timeout": 180, + "jobs": 2 + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + } + }, { "name": "ci-StdShar-GNUC", "configurePreset": "ci-StdShar-GNUC", @@ -257,7 +274,7 @@ ] }, { - "name": "ci-StdShar-Intel", + "name": "ci-StdShar-win-Intel", "configurePreset": "ci-StdShar-Intel", "inherits": [ "ci-x64-Release-Intel" @@ -266,7 +283,19 @@ "exclude": { "name": "H5DUMP-tfloatsattrs" } + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" } + }, + { + "name": "ci-StdShar-Intel", + "configurePreset": "ci-StdShar-Intel", + "inherits": [ + "ci-x64-Release-Intel" + ] } ], "packagePresets": [ @@ -315,6 +344,15 @@ {"type": "package", "name": "ci-StdShar-Clang"} ] }, + { + "name": "ci-StdShar-OSX-Clang", + "steps": [ + {"type": "configure", "name": "ci-StdShar-Clang"}, + {"type": "build", "name": "ci-StdShar-Clang"}, + {"type": "test", "name": "ci-StdShar-OSX-Clang"}, + {"type": "package", "name": "ci-StdShar-Clang"} + ] + }, { "name": "ci-StdShar-GNUC", "steps": [ @@ -341,7 +379,15 @@ {"type": "test", "name": "ci-StdShar-Intel"}, {"type": "package", "name": "ci-StdShar-Intel"} ] + }, + { + "name": "ci-StdShar-win-Intel", + "steps": [ + {"type": "configure", "name": "ci-StdShar-Intel"}, + {"type": "build", "name": "ci-StdShar-Intel"}, + {"type": "test", "name": "ci-StdShar-win-Intel"}, + {"type": "package", "name": "ci-StdShar-Intel"} + ] } ] } - From 3c61a78bcb598f850ebbeee886bef20705d494c1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 4 Feb 2024 10:40:04 -0600 Subject: [PATCH 2/3] Enable mac tests --- .github/workflows/cmake-bintest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index d78b6504026..d8a4473573a 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -153,7 +153,7 @@ jobs: # MacOS w/ Clang + CMake # name: "MacOS Clang Binary Test" - if: false +# if: false runs-on: macos-13 steps: - name: Install Dependencies (MacOS) From a2a0672db79b12b33672e4f768a72c099d32555b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 4 Feb 2024 11:17:42 -0600 Subject: [PATCH 3/3] Add platform test workflows to examples --- HDF5Examples/CMakePresets.json | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/HDF5Examples/CMakePresets.json b/HDF5Examples/CMakePresets.json index 263ff293b41..d9fdd04201a 100644 --- a/HDF5Examples/CMakePresets.json +++ b/HDF5Examples/CMakePresets.json @@ -128,6 +128,23 @@ "ci-x64-Release-Clang" ] }, + { + "name": "ci-StdShar-OSX-Clang", + "configurePreset": "ci-StdShar-Clang", + "inherits": [ + "ci-x64-Release-Clang" + ], + "execution": { + "noTestsAction": "error", + "timeout": 180, + "jobs": 2 + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + } + }, { "name": "ci-StdShar-GNUC", "configurePreset": "ci-StdShar-GNUC", @@ -135,6 +152,23 @@ "ci-x64-Release-GNUC" ] }, + { + "name": "ci-StdShar-win-Intel", + "configurePreset": "ci-StdShar-Intel", + "inherits": [ + "ci-x64-Release-Intel" + ], + "filter": { + "exclude": { + "name": "H5DUMP-tfloatsattrs" + } + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, { "name": "ci-StdShar-Intel", "configurePreset": "ci-StdShar-Intel", @@ -160,6 +194,14 @@ {"type": "test", "name": "ci-StdShar-Clang"} ] }, + { + "name": "ci-StdShar-OSX-Clang", + "steps": [ + {"type": "configure", "name": "ci-StdShar-Clang"}, + {"type": "build", "name": "ci-StdShar-Clang"}, + {"type": "test", "name": "ci-StdShar-OSX-Clang"} + ] + }, { "name": "ci-StdShar-GNUC", "steps": [ @@ -175,6 +217,14 @@ {"type": "build", "name": "ci-StdShar-Intel"}, {"type": "test", "name": "ci-StdShar-Intel"} ] + }, + { + "name": "ci-StdShar-win-Intel", + "steps": [ + {"type": "configure", "name": "ci-StdShar-Intel"}, + {"type": "build", "name": "ci-StdShar-Intel"}, + {"type": "test", "name": "ci-StdShar-win-Intel"} + ] } ] }