Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/HDFGroup/hdf5 into fix_G…
Browse files Browse the repository at this point in the history
…H-4447
  • Loading branch information
bmribler committed Jul 29, 2024
2 parents a596716 + f54abf7 commit 92e5af3
Show file tree
Hide file tree
Showing 122 changed files with 7,632 additions and 845 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ 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: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
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 +126,13 @@ jobs:
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`

- 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 @@ -470,6 +490,19 @@ 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: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
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 +517,13 @@ jobs:
path: ${{ runner.workspace }}/build/${{ 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
1 change: 1 addition & 0 deletions .github/workflows/main-cmake-par.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main-cmake-spc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ jobs:
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
Expand All @@ -235,12 +236,12 @@ jobs:
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_BUILD_JAVA=ON \
-DHDF5_BUILD_DOC=OFF \
-DLIBAEC_USE_LOCALCONTENT=ON \
-DZLIB_USE_LOCALCONTENT=ON \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \
-DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \
-DHDF5_ENABLE_ROS3_VFD:BOOL=ON \
-DHDF5_USE_ZLIBNG:BOOL=ON \
-DHDF5_USE_ZLIB_NG:BOOL=ON \
$GITHUB_WORKSPACE
shell: bash

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
# but that seems unnecessary
- name: "MacOS Clang"
os: macos-latest
cpp: OFF
cpp: ON
fortran: ON
java: ON
docs: ON
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
18 changes: 18 additions & 0 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ jobs:
name: zip-vs2022_cl-binary
path: ${{ github.workspace }}

- name: Get published msi binary (Windows)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: msi-vs2022_cl-binary
path: ${{ github.workspace }}

- name: Get published binary (MacOS)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
Expand Down Expand Up @@ -136,6 +142,12 @@ jobs:
name: zip-vs2022_intel-binary
path: ${{ github.workspace }}

- name: Get published msi binary (Windows_intel)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: msi-vs2022_intel-binary
path: ${{ github.workspace }}

- name: Get published binary (Linux_intel)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
Expand Down Expand Up @@ -173,8 +185,10 @@ jobs:
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
- name: Create sha256 sums for files for nonversioned files
Expand Down Expand Up @@ -216,8 +230,10 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
Expand All @@ -242,8 +258,10 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/remove-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip
1 change: 0 additions & 1 deletion .github/workflows/vol_adios2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

- name: Configure HDF5
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vol_async.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

- name: Checkout Argobots
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vol_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

- name: Checkout Argobots
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vol_ext_passthru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

- name: Checkout vol-external-passthrough
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vol_log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

# Log-based VOL currently doesn't have CMake support
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vol_rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
- name: Checkout HDF5
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5

- name: Configure HDF5 with REST VOL connector
Expand Down
27 changes: 23 additions & 4 deletions CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# [email protected].
#
option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF)
option (HDF5_USE_LIBAEC_STATIC "Use static AEC library" OFF)
option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF)
option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF)
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)

Expand Down Expand Up @@ -86,16 +87,29 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
endif ()
set(ZLIB_FOUND FALSE)
find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS static shared)
if (HDF5_USE_ZLIB_STATIC)
set(ZLIB_SEACH_TYPE static)
else ()
set(ZLIB_SEACH_TYPE shared)
endif ()
find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE})
if (NOT ZLIB_FOUND)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
endif()
find_package (ZLIB) # Legacy find
endif ()
set(H5_ZLIB_FOUND ${ZLIB_FOUND})
if (H5_ZLIB_FOUND)
set (H5_ZLIB_HEADER "zlib.h")
set (H5_ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
# The FindZLIB.cmake module does not set an OUTPUT_NAME
# on the target. The target returned is: ZLIB::ZLIB
get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
string (REGEX REPLACE "^lib" "" libname ${libname})
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
endif ()
else ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
Expand Down Expand Up @@ -131,9 +145,14 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
if (HDF5_USE_LIBAEC_STATIC)
set(LIBAEC_SEACH_TYPE static)
else ()
set(LIBAEC_SEACH_TYPE shared)
endif ()
set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
set(SZIP_FOUND FALSE)
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEACH_TYPE})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
endif ()
Expand Down
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
)
endif ()

# Whether the most recently called project() command, in the current scope or above,
# was in the top level CMakeLists.txt file.
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.21.0")
if(NOT PROJECT_IS_TOP_LEVEL)
set (HDF5_EXTERNALLY_CONFIGURED 1)
endif()
else()
if (NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set (HDF5_EXTERNALLY_CONFIGURED 1)
endif()
endif()
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
#
Expand Down
4 changes: 3 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"HDF5_PACKAGE_EXTLIBS": "ON",
"HDF5_USE_ZLIB_NG": "OFF",
"ZLIB_USE_LOCALCONTENT": "OFF",
"LIBAEC_USE_LOCALCONTENT": "OFF"
"LIBAEC_USE_LOCALCONTENT": "OFF",
"HDF5_USE_ZLIB_STATIC": "ON",
"HDF5_USE_LIBAEC_STATIC": "ON"
}
},
{
Expand Down
Loading

0 comments on commit 92e5af3

Please sign in to comment.