From dba347c80a6c06cd3ee84686c1e61c11c593cdc5 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 1 Aug 2023 17:12:01 -0600 Subject: [PATCH] ci: Add HDF5 to a windows build --- scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake | 3 +++ .../ci/cmake/ci-win2022-vs2022-serial.cmake | 3 +++ scripts/ci/gh-actions/windows-setup.ps1 | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake b/scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake index f51d9c438a..321d1d6cae 100644 --- a/scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake +++ b/scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake @@ -6,6 +6,9 @@ set(ENV{CXXFLAGS} /WX) set(dashboard_cache " ADIOS2_USE_Fortran:BOOL=OFF ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_HDF5:STRING=ON +ADIOS2_USE_HDF5_VOL:STRING=OFF +HDF5_DIR:PATH=C:/hdf5/HDF5-1.14.2.1-win64/cmake ") set(CTEST_CMAKE_GENERATOR "Visual Studio 17 2022") diff --git a/scripts/ci/cmake/ci-win2022-vs2022-serial.cmake b/scripts/ci/cmake/ci-win2022-vs2022-serial.cmake index f3b7347e7c..a078f1ee58 100644 --- a/scripts/ci/cmake/ci-win2022-vs2022-serial.cmake +++ b/scripts/ci/cmake/ci-win2022-vs2022-serial.cmake @@ -6,6 +6,9 @@ set(ENV{CXXFLAGS} /WX) set(dashboard_cache " ADIOS2_USE_Fortran:BOOL=OFF ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_HDF5:STRING=ON +ADIOS2_USE_HDF5_VOL:STRING=OFF +HDF5_DIR:PATH=C:/hdf5/HDF5-1.14.2.1-win64/cmake ") set(CTEST_CMAKE_GENERATOR "Visual Studio 17 2022") diff --git a/scripts/ci/gh-actions/windows-setup.ps1 b/scripts/ci/gh-actions/windows-setup.ps1 index 4334327a2b..4bcae1d35a 100644 --- a/scripts/ci/gh-actions/windows-setup.ps1 +++ b/scripts/ci/gh-actions/windows-setup.ps1 @@ -56,3 +56,27 @@ if($Env:GH_YML_MATRIX_PARALLEL -eq "ompi") Write-Host "::endgroup::" } +if ($Env:GH_YML_MATRIX_COMPILER -eq "vs2022") +{ + $url = "https://github.com/HDFGroup/hdf5/releases/download/hdf5-1_14_1-2/hdf5-1_14_1-2-win_vs2022.zip" + + $tempdir = $Env:RUNNER_TEMP + $hdf5Zip = Join-Path $tempdir hdf5-1_14_1-2-win_vs2022.zip + $installDir = "C:\hdf5" + $extractDir = Join-Path $tempdir hdf5 + $innerZip = Join-Path $extractDir HDF5-1.14.2.1-win64.zip + + Write-Host "::group::Downloading windows HDF5 release $url" + Invoke-WebRequest $url -OutFile $hdf5Zip + Write-Host "::endgroup::" + + Write-Host "::group::Extracting outer windows HDF5 release $hdf5Zip" + Expand-Archive $hdf5Zip -DestinationPath $tempDir -Force + Write-Host "::endgroup::" + + Write-Host "::group::Extracting inner windows HDF5 release $innerZip" + Expand-Archive $innerZip -DestinationPath $installDir -Force + Write-Host "::endgroup::" + + # Now the HDF5_DIR can be set to: C:\hdf5\HDF5-1.14.2.1-win64\cmake +}