Skip to content

Commit

Permalink
Sync develop changes July 19 - July 29 to hdf5_1_14 (HDFGroup#4678)
Browse files Browse the repository at this point in the history
* publish msi binary (HDFGroup#4663)

* Add publish from branch workflow (HDFGroup#4664)

* Replace incorrect use of an internal function (HDFGroup#4668)

* Replace incorrect use of an internal function

In some API functions, the internal function H5I_object() was used instead
of H5I_object_verify(), which verifies the type of an ID argument.  So
when an inappropriate ID was passed in to the affected API, it was accepted.
This behavior can cause issues at a later time, including a segfault, as
reported in issue #HDFGroupGH-4656.

The fix was applied to the following functions:
H5Fget_intent()
H5Fget_fileno()
H5Fget_freespace()
H5Fget_create_plist()
H5Fget_access_plist()
H5Fget_vfd_handle()
H5Dvlen_get_buf_size()
H5Fget_mdc_config()
H5Fset_mdc_config()
H5Freset_mdc_hit_rate_stats()

Fixes HDFGroupGH-4662

* Fix incorrect indentation for permissions. (HDFGroup#4669)

* Remove outdated line from Copyright header in new files. (HDFGroup#4676)

* Fix binary examples process (HDFGroup#4666)

---------

Co-authored-by: Allen Byrne <[email protected]>
Co-authored-by: bmribler <[email protected]>
  • Loading branch information
3 people authored Jul 30, 2024
1 parent 7293c1e commit 7481563
Show file tree
Hide file tree
Showing 19 changed files with 532 additions and 39 deletions.
65 changes: 63 additions & 2 deletions .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang Binary Test"
runs-on: macos-latest
runs-on: macos-13
steps:
- name: Install Dependencies (MacOS)
run: brew install ninja doxygen
Expand All @@ -161,7 +161,7 @@ jobs:
- name: Get published binary (MacOS)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-osx-${{ inputs.build_mode }}-binary
name: tgz-osx13-${{ inputs.build_mode }}-binary
path: ${{ github.workspace }}

- name: Uncompress hdf5 binary (MacOS)
Expand Down Expand Up @@ -204,3 +204,64 @@ jobs:
cmake --workflow --preset=ci-StdShar-OSX-Clang --fresh
shell: bash

test_binary_mac_latest:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang Binary Test"
runs-on: macos-latest
steps:
- name: Install Dependencies (MacOS_latest)
run: brew install ninja doxygen

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Get published binary (MacOS_latest)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-osx-${{ inputs.build_mode }}-binary
path: ${{ github.workspace }}

- name: Uncompress hdf5 binary (MacOS_latest)
run: |
cd "${{ github.workspace }}"
tar -zxvf ${{ github.workspace }}/HDF5-*-Darwin.tar.gz --strip-components 1
- name: set hdf5lib name
id: set-hdf5lib-name
run: |
HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/
FILE_NAME_HDF5=$(ls ${{ github.workspace }}/HDF_Group/HDF5)
echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT
echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT
- name: List files for the binaries (MacOS_latest)
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: List files for the space (MacOS_latest)
run: |
ls ${{ github.workspace }}
ls ${{ runner.workspace }}
# symlinks the compiler executables to a common location
- name: Setup GNU Fortran
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 12

- name: Run ctest (MacOS_latest)
id: run-ctest
env:
HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}
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-OSX-Clang --fresh
shell: bash

149 changes: 144 additions & 5 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ jobs:
cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh
shell: bash

- name: Publish binary (Windows)
id: publish-ctest-binary
- name: Create build folders (Windows)
run: |
mkdir "${{ runner.workspace }}/build114"
mkdir "${{ runner.workspace }}/build114/hdf5"
shell: bash

- name: Publish binary (Windows)
id: publish-ctest-binary
run: |
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build114/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build114/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-MSVC/README.md -Destination ${{ runner.workspace }}/build114/hdf5/
Expand All @@ -99,6 +103,17 @@ jobs:
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip hdf5
shell: pwsh

- name: Publish msi binary (Windows)
id: publish-ctest-msi-binary
run: |
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-MSVC/README.md -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.msi
cd "${{ runner.workspace }}/build"
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip hdf5
shell: pwsh

- name: List files in the space (Windows)
run: |
Get-ChildItem -Path ${{ github.workspace }}
Expand All @@ -113,6 +128,13 @@ jobs:
path: ${{ runner.workspace }}/build114/${{ 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`

- name: Save published msi binary (Windows)
uses: actions/upload-artifact@v4
with:
name: msi-vs2022_cl-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_linux:
# Linux (Ubuntu) w/ gcc + CMake
#
Expand Down Expand Up @@ -253,6 +275,12 @@ jobs:
with:
version: "1.9.7"

- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'

- name: Set file base name (MacOS)
id: set-file-base
run: |
Expand Down Expand Up @@ -306,7 +334,7 @@ jobs:
cp ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-Clang/README.md ${{ runner.workspace }}/build114/hdf5
cp ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build114/hdf5
cd "${{ runner.workspace }}/build114"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz hdf5
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx13.tar.gz hdf5
shell: bash

- name: List files in the space (MacOS)
Expand All @@ -316,6 +344,95 @@ jobs:
# Save files created by ctest script
- name: Save published binary (MacOS)
uses: actions/upload-artifact@v4
with:
name: tgz-osx13-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx13.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_mac_latest:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang CMake"
runs-on: macos-latest
steps:
- name: Install Dependencies (MacOS_latest)
run: brew install ninja

- name: Install Dependencies
uses: ssciwr/doxygen-install@v1
with:
version: "1.9.7"

- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Set file base name (MacOS_latest)
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
# Get files created by release script
- name: Get tgz-tarball (MacOS_latest)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-tarball
path: ${{ github.workspace }}

- name: List files for the space (MacOS_latest)
run: |
ls ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress source (MacOS_latest)
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz

# symlinks the compiler executables to a common location
- name: Setup GNU Fortran
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 12

- name: Run ctest (MacOS_latest)
id: run-ctest
run: |
cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}"
cmake --workflow --preset=${{ inputs.preset_name }}-OSX-Clang --fresh
shell: bash

- name: Publish binary (MacOS_latest)
id: publish-ctest-binary
run: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/README.md ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz hdf5
shell: bash

- name: List files in the space (MacOS_latest)
run: |
ls ${{ github.workspace }}
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published binary (MacOS_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-osx-binary
Expand Down Expand Up @@ -457,11 +574,15 @@ jobs:
cmake --workflow --preset=${{ inputs.preset_name }}-win-Intel --fresh
shell: pwsh

- name: Publish binary (Windows_intel)
id: publish-ctest-binary
- name: Create build folders (Windows_intel)
run: |
mkdir "${{ runner.workspace }}/build114"
mkdir "${{ runner.workspace }}/build114/hdf5"
shell: bash

- name: Publish binary (Windows_intel)
id: publish-ctest-binary
run: |
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build114/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build114/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-Intel/README.md -Destination ${{ runner.workspace }}/build114/hdf5/
Expand All @@ -470,6 +591,17 @@ jobs:
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip hdf5
shell: pwsh

- name: Publish msi binary (Windows_intel)
id: publish-ctest-msi-binary
run: |
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/README.md -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.msi
cd "${{ runner.workspace }}/build"
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip hdf5
shell: pwsh

- name: List files in the space (Windows_intel)
run: |
Get-ChildItem -Path ${{ github.workspace }}
Expand All @@ -484,6 +616,13 @@ jobs:
path: ${{ runner.workspace }}/build114/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- name: Save published msi binary (Windows_intel)
uses: actions/upload-artifact@v4
with:
name: msi-vs2022_intel-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_linux_intel:
# Linux (Ubuntu) w/ OneAPI + CMake
#
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ jobs:
if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') }}

- name: Save published binary (Mac)
uses: actions/upload-artifact@v4
with:
name: tgz-osx13-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-13') && (inputs.thread_safety != 'TS') }}

- name: Save published binary (Mac_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-osx-${{ inputs.build_mode }}-binary
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: hdf5 publish files in HDF5 folder from branch to S3

# Triggers the workflow on demand
on:
workflow_dispatch:
inputs:
local_dir:
description: 'HDF5 local directory'
type: string
required: true
target_dir:
description: 'hdf5 target bucket directory'
type: string
required: true

permissions:
contents: read

jobs:
publish-tag:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
ref: '${{ github.head_ref || github.ref_name }}'

- name: List files for the space
run: |
ls -l ${{ github.workspace }}
ls ${{ github.workspace }}/HDF5
- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Sync dir to S3 bucket
run: |
aws s3 sync ./HDF5/${{ inputs.local_dir }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}
9 changes: 5 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ on:
description: 'HDF5 target bucket directory'
type: string
required: true
permissions:
contents: read

permissions:
contents: read

jobs:
publish-tag:
Expand Down Expand Up @@ -47,9 +48,9 @@ jobs:
aws s3 sync ./HDF5 s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/downloads --delete
- name: Uncompress source (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}.doxygen.tar.gz
run: tar -zxvf ${{ github.workspace }}/HDF5/${{ inputs.use_hdf }}.doxygen.tar.gz

- name: Sync userguide to S3 bucket
run: |
aws s3 sync ./doxygen s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation --delete
aws s3 sync ./HDF5/doxygen s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation/doxygen --delete
Loading

0 comments on commit 7481563

Please sign in to comment.