From 865a484fec3cde4175fbf683d78abc8f7504c00c Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:11:45 -0600 Subject: Make platform specific test presets for windows and macs (#3988) * Enable mac tests * Add platform test workflows to examples --- .github/workflows/cmake-bintest.yml | 4 +-- .github/workflows/cmake-ctest.yml | 7 +++--- CMakePresets.json | 50 +++++++++++++++++++++++++++++++++++-- HDF5Examples/CMakePresets.json | 50 +++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index fb02bce..d8a4473 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) @@ -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 5351c74..24d5b73 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -220,12 +220,13 @@ 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) id: publish-ctest-binary run: | + mkdir "${{ runner.workspace }}/build114" mkdir "${{ runner.workspace }}/build114/hdf5" cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build114/hdf5 @@ -369,7 +370,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 +381,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 65c56d7..61afadd 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -243,6 +243,23 @@ ] }, { + "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", "inherits": [ @@ -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": [ @@ -316,6 +345,15 @@ ] }, { + "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": [ {"type": "configure", "name": "ci-StdShar-GNUC"}, @@ -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"} + ] } ] } - diff --git a/HDF5Examples/CMakePresets.json b/HDF5Examples/CMakePresets.json index 263ff29..d9fdd04 100644 --- a/HDF5Examples/CMakePresets.json +++ b/HDF5Examples/CMakePresets.json @@ -129,6 +129,23 @@ ] }, { + "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", "inherits": [ @@ -136,6 +153,23 @@ ] }, { + "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", "inherits": [ @@ -161,6 +195,14 @@ ] }, { + "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": [ {"type": "configure", "name": "ci-StdShar-GNUC"}, @@ -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"} + ] } ] } -- cgit v0.12