Skip to content

Commit

Permalink
Merge updates (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Apr 11, 2024
1 parent 3bbf598 commit dda5126
Show file tree
Hide file tree
Showing 11 changed files with 908 additions and 217 deletions.
124 changes: 62 additions & 62 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
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
Expand Down Expand Up @@ -35,17 +40,29 @@ jobs:
- name: Install Dependencies (Windows)
run: choco install ninja

- uses: actions/checkout@v3

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1
uses: ilammy/msvc-dev-cmd@v1.13.0

- 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'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'

- name: Get hdf5 release
Expand Down Expand Up @@ -87,21 +104,7 @@ jobs:

- name: List files for the binaries (Win)
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- 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 }}' == 'snapshots' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash
ls -l ${{ github.workspace }}/HDF_Group/HDF5
# Get files created by release script
- name: Get zip-tarball (Windows)
Expand Down Expand Up @@ -139,7 +142,7 @@ jobs:
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/hdfsrc/README.md -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
Expand All @@ -166,16 +169,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install CMake Dependencies (Linux)
run: sudo apt-get install ninja-build doxygen graphviz
run: |
sudo apt-get update
sudo apt-get install ninja-build
- uses: actions/checkout@v3
- 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'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz'

- name: Get hdf5 release
Expand All @@ -188,8 +204,8 @@ jobs:

- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
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
Expand All @@ -208,20 +224,7 @@ jobs:
- name: List files for the binaries (Linux)
run: |
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
- 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 }}' == 'snapshots' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
# Get files created by release script
- name: Get tgz-tarball (Linux)
Expand Down Expand Up @@ -252,7 +255,7 @@ jobs:
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/hdfsrc/README.md ${{ 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
Expand All @@ -275,19 +278,30 @@ jobs:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang CMake"
runs-on: macos-11
runs-on: macos-13
steps:
- name: Install Dependencies (MacOS)
run: brew install ninja doxygen
run: brew install ninja

- uses: actions/checkout@v3
- 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'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf }}-osx12.tar.gz'

- name: Get hdf5 release
Expand All @@ -300,8 +314,8 @@ jobs:

- name: List files for the space (MacOS)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (MacOS)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-osx12.tar.gz
Expand All @@ -320,20 +334,7 @@ jobs:
- name: List files for the binaries (MacOS)
run: |
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
- 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 }}' == 'snapshots' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5
# Get files created by release script
- name: Get tgz-tarball (MacOS)
Expand Down Expand Up @@ -365,7 +366,7 @@ jobs:
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/hdfsrc/README.md ${{ 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
Expand All @@ -383,4 +384,3 @@ jobs:
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`

68 changes: 43 additions & 25 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,21 @@ on:
type: string
required: false
default: check
use_environ:
description: 'Environment to locate files'
type: string
required: false
default: snapshots
pull_request:
branches: [ "master" ]
branches: [ "release/1_14_4" ]

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
jobs:
get-base-names:
get-old-names:
runs-on: ubuntu-latest
outputs:
hdf5-name: ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}
plugin-name: ${{ steps.getpluginbase.outputs.PLUGIN_NAME_BASE }}
run-ignore: ${{ steps.getinputs.outputs.INPUTS_IGNORE }}
run-environ: ${{ steps.getinputs.outputs.INPUTS_ENVIRON }}

steps:
- uses: actions/checkout@v4.1.1
Expand All @@ -36,52 +31,75 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot'
version: 'tags/snapshot-1.14'
file: 'last-file.txt'

- name: Read base-name file
- name: Read HDF5 base-name file
id: gethdf5base
run: echo "HDF5_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT

- run: echo "hdf5 base name is ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}."

- name: Get plugin release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5_plugins'
version: 'tags/snapshot-1.14'
file: 'last-file.txt'
continue-on-error: true

- name: Read base-name file
id: getpluginbase
run: echo "PLUGIN_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT

- run: echo "plugin base name is ${{ steps.getpluginbase.outputs.PLUGIN_NAME_BASE }}."

- name: Read inputs
id: getinputs
run: |
echo "INPUTS_IGNORE=${{ ((github.event.inputs.use_ignore == '' && github.event.inputs.use_ignore) || 'ignore') }}" >> $GITHUB_OUTPUT
echo "INPUTS_ENVIRON=${{ ((github.event.inputs.use_environ == '' && github.event.inputs.use_environ) || 'snapshots') }}" >> $GITHUB_OUTPUT
- run: echo "use_ignore is ${{ steps.getinputs.outputs.INPUTS_IGNORE }}."

- run: echo "use_environ is ${{ steps.getinputs.outputs.INPUTS_ENVIRON }}."

call-workflow-tarball:
needs: get-base-names
needs: [get-old-names]
uses: ./.github/workflows/tarball.yml
with:
use_ignore: ${{ needs.get-base-names.outputs.run-ignore }}
use_environ: ${{ needs.get-base-names.outputs.run-environ }}
use_tag: snapshot-1.14
use_environ: snapshots

call-workflow-ctest:
needs: [get-base-names, call-workflow-tarball]
needs: [get-old-names, call-workflow-tarball]
uses: ./.github/workflows/cmake-ctest.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
preset_name: ci-StdShar
use_hdf: ${{ needs.get-base-names.outputs.hdf5-name }}
use_environ: ${{ needs.get-base-names.outputs.run-environ }}
if: ${{ ((needs.get-base-names.outputs.run-environ == 'snapshots') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore'))) || (needs.get-base-names.outputs.run-environ == 'release') }}
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_hdf: ${{ needs.get-old-names.outputs.hdf5-name }}
# use_tag: snapshot-1.14
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

call-workflow-release:
needs: [get-base-names, call-workflow-tarball, call-workflow-ctest]
needs: [get-old-names, call-workflow-tarball, call-workflow-ctest]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release-files.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
use_tag: snapshot
use_environ: ${{ needs.get-base-names.outputs.run-environ }}
if: ${{ ((needs.get-base-names.outputs.run-environ == 'snapshots') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore'))) || (needs.get-base-names.outputs.run-environ == 'release') }}
use_tag: snapshot-1.14
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

call-workflow-remove:
needs: [get-old-names, call-workflow-tarball, call-workflow-ctest, call-workflow-release]
permissions:
contents: write # In order to allow file deletion
uses: ./.github/workflows/remove-files.yml
with:
file_base: ${{ needs.get-old-names.outputs.plugin-name }}
use_tag: snapshot-1.14
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

Loading

0 comments on commit dda5126

Please sign in to comment.