mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
Fix binary examples process (#4666)
This commit is contained in:
parent
f54abf7032
commit
d309a40325
65
.github/workflows/cmake-bintest.yml
vendored
65
.github/workflows/cmake-bintest.yml
vendored
@ -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
|
||||
@ -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)
|
||||
@ -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
|
||||
|
||||
|
117
.github/workflows/cmake-ctest.yml
vendored
117
.github/workflows/cmake-ctest.yml
vendored
@ -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 }}/build"
|
||||
mkdir "${{ runner.workspace }}/build/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 }}/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/
|
||||
@ -102,8 +106,6 @@ jobs:
|
||||
- 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/
|
||||
@ -273,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: |
|
||||
@ -326,7 +334,7 @@ jobs:
|
||||
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
|
||||
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx13.tar.gz hdf5
|
||||
shell: bash
|
||||
|
||||
- name: List files in the space (MacOS)
|
||||
@ -336,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
|
||||
@ -477,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 }}/build"
|
||||
mkdir "${{ runner.workspace }}/build/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 }}/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/
|
||||
@ -493,8 +594,6 @@ jobs:
|
||||
- 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/
|
||||
|
8
.github/workflows/main-cmake.yml
vendored
8
.github/workflows/main-cmake.yml
vendored
@ -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
|
||||
|
@ -49,6 +49,8 @@
|
||||
"description": "MSVC Standard Config for x64 (Release)",
|
||||
"inherits": [
|
||||
"ci-x64-Release-MSVC",
|
||||
"ci-StdJava",
|
||||
"ci-StdFortran",
|
||||
"ci-StdShar"
|
||||
]
|
||||
},
|
||||
@ -57,6 +59,8 @@
|
||||
"description": "Clang Standard Config for x64 (Release)",
|
||||
"inherits": [
|
||||
"ci-x64-Release-Clang",
|
||||
"ci-StdJava",
|
||||
"ci-StdFortran",
|
||||
"ci-StdShar"
|
||||
]
|
||||
},
|
||||
@ -65,6 +69,8 @@
|
||||
"description": "GNUC Standard Config for x64 (Release)",
|
||||
"inherits": [
|
||||
"ci-x64-Release-GNUC",
|
||||
"ci-StdJava",
|
||||
"ci-StdFortran",
|
||||
"ci-StdShar"
|
||||
]
|
||||
},
|
||||
@ -73,6 +79,8 @@
|
||||
"description": "Intel Standard Config for x64 (Release)",
|
||||
"inherits": [
|
||||
"ci-x64-Release-Intel",
|
||||
"ci-StdJava",
|
||||
"ci-StdFortran",
|
||||
"ci-StdShar"
|
||||
]
|
||||
}
|
||||
@ -98,7 +106,7 @@
|
||||
"name": "ci-StdShar-GNUC",
|
||||
"description": "GNUC Standard Build for x64 (Release)",
|
||||
"configurePreset": "ci-StdShar-GNUC",
|
||||
"verbose": false,
|
||||
"verbose": true,
|
||||
"inherits": [
|
||||
"ci-x64-Release-GNUC"
|
||||
]
|
||||
@ -107,7 +115,7 @@
|
||||
"name": "ci-StdShar-Intel",
|
||||
"description": "Intel Standard Build for x64 (Release)",
|
||||
"configurePreset": "ci-StdShar-Intel",
|
||||
"verbose": false,
|
||||
"verbose": true,
|
||||
"inherits": [
|
||||
"ci-x64-Release-Intel"
|
||||
]
|
||||
|
@ -191,9 +191,17 @@ macro (HDF5_SUPPORT)
|
||||
endif ()
|
||||
set (H5EX_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:${HDF5_NAMESPACE}h5dump>)
|
||||
else ()
|
||||
if (HDF5_BUILD_MODE)
|
||||
string (TOUPPER "_${HDF5_BUILD_MODE}" UPPER_BUILD_TYPE)
|
||||
elseif (HDF_CFG_NAME)
|
||||
string (TOUPPER "_${HDF_CFG_NAME}" UPPER_BUILD_TYPE)
|
||||
else ()
|
||||
set (UPPER_BUILD_TYPE "")
|
||||
endif ()
|
||||
get_filename_component (_LIBRARY_PATH ${HDF5_INCLUDE_DIR} DIRECTORY)
|
||||
set (HDF5_LIBRARY_PATH "${_LIBRARY_PATH}/lib")
|
||||
if (USE_SHARED_LIBS AND HDF5_shared_C_FOUND)
|
||||
set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY})
|
||||
set (HDF5_LIBRARY_PATH ${PACKAGE_PREFIX_DIR}/lib)
|
||||
else ()
|
||||
set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
|
||||
endif ()
|
||||
@ -227,20 +235,11 @@ macro (HDF5_SUPPORT)
|
||||
if (HDF_BUILD_JAVA AND HDF5_Java_FOUND)
|
||||
if (${HDF5_BUILD_JAVA})
|
||||
set (CMAKE_JAVA_INCLUDE_PATH "${CMAKE_JAVA_INCLUDE_PATH};${HDF5_JAVA_INCLUDE_DIRS}")
|
||||
if (HDF5_BUILD_MODE)
|
||||
string(TOUPPER "${HDF5_BUILD_MODE}" UPPER_BUILD_TYPE)
|
||||
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME_${UPPER_BUILD_TYPE})
|
||||
elseif (HDF_CFG_NAME)
|
||||
string(TOUPPER "${HDF_CFG_NAME}" UPPER_BUILD_TYPE)
|
||||
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME_${UPPER_BUILD_TYPE})
|
||||
else()
|
||||
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME)
|
||||
endif()
|
||||
get_target_property (libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME${UPPER_BUILD_TYPE})
|
||||
get_filename_component (libname ${libsoname} NAME_WE)
|
||||
string (REGEX REPLACE "^lib" "" libname ${libname})
|
||||
message (STATUS "HDF5 lib:${HDF5_JAVA_LIBRARY} OR ${libsoname} OR ${libname}")
|
||||
set (H5EX_JAVA_LIBRARY ${libname})
|
||||
# set (H5EX_JAVA_LIBRARY $<TARGET_FILE_BASE_NAME:${HDF5_JAVA_LIBRARY}>)
|
||||
set (H5EX_JAVA_LIBRARIES ${HDF5_JAVA_LIBRARY})
|
||||
message (STATUS "HDF5 lib:${H5EX_JAVA_LIBRARY} jars:${HDF5_JAVA_INCLUDE_DIRS}}")
|
||||
else ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user