Skip to content

Commit

Permalink
ci: Add HDF5 to a windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
scottwittenburg committed Aug 29, 2023
1 parent 1880bd5 commit 6f026ff
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/ci/cmake/ci-win2022-vs2022-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/cmake/ci-win2022-vs2022-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
24 changes: 24 additions & 0 deletions scripts/ci/gh-actions/windows-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 6f026ff

Please sign in to comment.