-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
453 changed files
with
12,708 additions
and
8,650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,386 @@ | ||
name: hdf5 plugins ctest runs | ||
|
||
# Controls when the action will run. Triggers the workflow on a call | ||
on: | ||
workflow_call: | ||
inputs: | ||
use_hdf: | ||
description: "The hdf5 base name of the binaries" | ||
required: true | ||
type: string | ||
snap_name: | ||
description: 'The name in the source tarballs' | ||
type: string | ||
required: false | ||
default: hdfsrc | ||
file_base: | ||
description: "The common base name of the source tarballs" | ||
required: true | ||
type: string | ||
preset_name: | ||
description: "The common base name of the preset configuration name to control the build" | ||
required: true | ||
type: string | ||
use_environ: | ||
description: 'Environment to locate files' | ||
type: string | ||
required: true | ||
default: snapshots | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_and_test_win: | ||
# Windows w/ MSVC + CMake | ||
# | ||
name: "Windows MSVC CTest" | ||
runs-on: windows-latest | ||
steps: | ||
- name: Install Dependencies (Windows) | ||
run: choco install ninja | ||
|
||
- name: Enable Developer Command Prompt | ||
uses: ilammy/[email protected] | ||
|
||
- name: Set file base name (Windows) | ||
id: set-file-base | ||
run: | | ||
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") | ||
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT | ||
if [[ '${{ inputs.use_environ }}' == 'release' ]] | ||
then | ||
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}") | ||
else | ||
SOURCE_NAME_BASE=$(echo "hdfsrc") | ||
fi | ||
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'snapshots') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/snapshot-1.14' | ||
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip' | ||
|
||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'release') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/${{ inputs.use_hdf }}' | ||
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip' | ||
|
||
- name: Uncompress gh binary (Win) | ||
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip | ||
|
||
- name: Uncompress hdf5 binary (Win) | ||
working-directory: ${{ github.workspace }}/hdf5 | ||
run: 7z x HDF5-*-win64.zip | ||
shell: bash | ||
|
||
- name: List files for the space (Win) | ||
run: | | ||
ls -l ${{ github.workspace }}/hdf5 | ||
- name: create hdf5 location (Win) | ||
working-directory: ${{ github.workspace }}/hdf5 | ||
run: | | ||
New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory | ||
Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse | ||
shell: pwsh | ||
|
||
- name: List files for the space (Win) | ||
run: ls -l ${{ github.workspace }}/HDF_Group/HDF5 | ||
|
||
- name: set hdf5lib name | ||
id: set-hdf5lib-name | ||
run: | | ||
HDF5DIR="${{ github.workspace }}/HDF_Group/HDF5" | ||
echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: List files for the binaries (Win) | ||
run: | | ||
ls -l ${{ github.workspace }}/HDF_Group/HDF5 | ||
# Get files created by release script | ||
- name: Get zip-tarball (Windows) | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
with: | ||
name: zip-tarball | ||
path: ${{ github.workspace }} | ||
|
||
- name: using powershell | ||
shell: pwsh | ||
run: Get-Location | ||
|
||
- name: List files for the space (Windows) | ||
run: | | ||
Get-ChildItem -Path ${{ github.workspace }} | ||
Get-ChildItem -Path ${{ runner.workspace }} | ||
shell: pwsh | ||
|
||
- name: Uncompress source (Windows) | ||
working-directory: ${{ github.workspace }} | ||
run: 7z x ${{ steps.set-file-base.outputs.FILE_BASE }}.zip | ||
shell: bash | ||
|
||
- name: Run ctest (Windows) | ||
env: | ||
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} | ||
run: | | ||
cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" | ||
cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh | ||
shell: bash | ||
|
||
- name: Publish binary (Windows) | ||
id: publish-ctest-binary | ||
run: | | ||
mkdir "${{ runner.workspace }}/build" | ||
mkdir "${{ runner.workspace }}/build/hdf5_plugins" | ||
Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5_plugins/ | ||
Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-MSVC/README.txt -Destination ${{ runner.workspace }}/build/hdf5_plugins/ | ||
Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5_plugins/ -Include *.zip | ||
cd "${{ runner.workspace }}/build" | ||
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip hdf5_plugins | ||
shell: pwsh | ||
|
||
- name: List files in the space (Windows) | ||
run: | | ||
Get-ChildItem -Path ${{ github.workspace }} | ||
Get-ChildItem -Path ${{ runner.workspace }} | ||
shell: pwsh | ||
|
||
# Save files created by ctest script | ||
- name: Save published binary (Windows) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: zip-vs2022_cl-binary | ||
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | ||
|
||
build_and_test_linux: | ||
# Linux (Ubuntu) w/ gcc + CMake | ||
# | ||
name: "Ubuntu gcc CMake" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install CMake Dependencies (Linux) | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build | ||
- name: Set file base name (Linux) | ||
id: set-file-base | ||
run: | | ||
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") | ||
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT | ||
if [[ '${{ inputs.use_environ }}' == 'release' ]] | ||
then | ||
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}") | ||
else | ||
SOURCE_NAME_BASE=$(echo "hdfsrc") | ||
fi | ||
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT | ||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'snapshots') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/snapshot-1.14' | ||
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz' | ||
|
||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'release') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/${{ inputs.use_hdf }}' | ||
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz' | ||
|
||
- name: List files for the space (Linux) | ||
run: | | ||
ls -l ${{ github.workspace }} | ||
ls ${{ runner.workspace }} | ||
- name: Uncompress gh binary (Linux) | ||
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz | ||
|
||
- name: Uncompress hdf5 binary (Linux) | ||
run: | | ||
cd "${{ github.workspace }}/hdf5" | ||
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Linux.tar.gz --strip-components 1 | ||
- name: set hdf5lib name | ||
id: set-hdf5lib-name | ||
run: | | ||
HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ | ||
FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) | ||
echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT | ||
- name: List files for the binaries (Linux) | ||
run: | | ||
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 | ||
# Get files created by release script | ||
- name: Get tgz-tarball (Linux) | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
with: | ||
name: tgz-tarball | ||
path: ${{ github.workspace }} | ||
|
||
- name: List files for the space (Linux) | ||
run: | | ||
ls -l ${{ github.workspace }} | ||
ls ${{ runner.workspace }} | ||
- name: Uncompress source (Linux) | ||
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz | ||
|
||
- name: Run ctest (Linux) | ||
env: | ||
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} | ||
run: | | ||
cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" | ||
cmake --workflow --preset=${{ inputs.preset_name }}-GNUC --fresh | ||
shell: bash | ||
|
||
- name: Publish binary (Linux) | ||
id: publish-ctest-binary | ||
run: | | ||
mkdir "${{ runner.workspace }}/build" | ||
mkdir "${{ runner.workspace }}/build/hdf5_plugins" | ||
cp ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5_plugins | ||
cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-GNUC/README.txt ${{ runner.workspace }}/build/hdf5_plugins | ||
cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-GNUC/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins | ||
cd "${{ runner.workspace }}/build" | ||
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz hdf5_plugins | ||
shell: bash | ||
|
||
- name: List files in the space (Linux) | ||
run: | | ||
ls ${{ github.workspace }} | ||
ls -l ${{ runner.workspace }} | ||
# Save files created by ctest script | ||
- name: Save published binary (Linux) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tgz-ubuntu-2204_gcc-binary | ||
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | ||
|
||
build_and_test_mac: | ||
# MacOS w/ Clang + CMake | ||
# | ||
name: "MacOS Clang CMake" | ||
runs-on: macos-13 | ||
steps: | ||
- name: Install Dependencies (MacOS) | ||
run: brew install ninja | ||
|
||
- name: Set file base name (MacOS) | ||
id: set-file-base | ||
run: | | ||
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") | ||
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT | ||
if [[ '${{ inputs.use_environ }}' == 'release' ]] | ||
then | ||
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}") | ||
else | ||
SOURCE_NAME_BASE=$(echo "hdfsrc") | ||
fi | ||
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT | ||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'snapshots') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/snapshot-1.14' | ||
file: '${{ inputs.use_hdf }}-osx12.tar.gz' | ||
|
||
- name: Get hdf5 release | ||
if: ${{ (inputs.use_environ == 'release') }} | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'HDFGroup/hdf5' | ||
version: 'tags/${{ inputs.use_hdf }}' | ||
file: '${{ inputs.use_hdf }}-osx12.tar.gz' | ||
|
||
- name: List files for the space (MacOS) | ||
run: | | ||
ls -l ${{ github.workspace }} | ||
ls ${{ runner.workspace }} | ||
- name: Uncompress gh binary (MacOS) | ||
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-osx12.tar.gz | ||
|
||
- name: Uncompress hdf5 binary (MacOS) | ||
run: | | ||
cd "${{ github.workspace }}/hdf5" | ||
tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1 | ||
- name: set hdf5lib name | ||
id: set-hdf5lib-name | ||
run: | | ||
HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ | ||
FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) | ||
echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT | ||
- name: List files for the binaries (MacOS) | ||
run: | | ||
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 | ||
# Get files created by release script | ||
- name: Get tgz-tarball (MacOS) | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
with: | ||
name: tgz-tarball | ||
path: ${{ github.workspace }} | ||
|
||
- name: List files for the space (MacOS) | ||
run: | | ||
ls ${{ github.workspace }} | ||
ls ${{ runner.workspace }} | ||
- name: Uncompress source (MacOS) | ||
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz | ||
|
||
- name: Run ctest (MacOS) | ||
id: run-ctest | ||
env: | ||
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} | ||
run: | | ||
cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" | ||
cmake --workflow --preset=${{ inputs.preset_name }}-Clang --fresh | ||
shell: bash | ||
|
||
- name: Publish binary (MacOS) | ||
id: publish-ctest-binary | ||
run: | | ||
mkdir "${{ runner.workspace }}/build" | ||
mkdir "${{ runner.workspace }}/build/hdf5_plugins" | ||
cp ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5_plugins | ||
cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-Clang/README.txt ${{ runner.workspace }}/build/hdf5_plugins | ||
cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins | ||
cd "${{ runner.workspace }}/build" | ||
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf5_plugins | ||
shell: bash | ||
|
||
- name: List files in the space (MacOS) | ||
run: | | ||
ls ${{ github.workspace }} | ||
ls -l ${{ runner.workspace }} | ||
# Save files created by ctest script | ||
- name: Save published binary (MacOS) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tgz-osx12-binary | ||
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` |
Oops, something went wrong.