-
-
Notifications
You must be signed in to change notification settings - Fork 24
Add workflows to test filter libraries installed in various ways #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,248 @@ | ||
| name: HDF5 plugins testing with CMake FetchContent on MacOS | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| build_mode: | ||
| description: "Build type (CMAKE_BUILD_TYPE)" | ||
| required: true | ||
| type: string | ||
| hdf5_tag: | ||
| description: "HDF5 git tag to use" | ||
| required: false | ||
| default: "develop" | ||
| type: string | ||
| zlib_type: | ||
| description: "Type of zlib to use ('zlib' (default) or 'zlib-ng')" | ||
| required: false | ||
| default: "zlib" | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # Test building filter libraries and hdf5_plugins project inline with CMake's | ||
| # FetchContent (git) functionality while building HDF5. | ||
| build_and_test_inline: | ||
| name: "MacOS Clang (hdf5_plugins built inline with HDF5)" | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Get sources for HDF5 | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| repository: HDFGroup/hdf5 | ||
| ref: "${{ inputs.hdf5_tag }}" | ||
| path: ${{ github.workspace }}/hdf5 | ||
|
|
||
| - name: Set zlib-ng option | ||
| id: set_zlibng_option | ||
| run: | | ||
| if test "${{ inputs.zlib_type }}" = "zlib-ng"; then | ||
| echo "zlibng_option=ON" >> "$GITHUB_OUTPUT" | ||
| echo "zlib_external=ON" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "zlibng_option=OFF" >> "$GITHUB_OUTPUT" | ||
| echo "zlib_external=OFF" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| # TODO: Re-enable ZSTD testing after CMake logic issue is fixed | ||
| # NOTE: HDF_ENABLE_BLOSC_ZLIB_SUPPORT is set to OFF because otherwise | ||
| # the hdf5_plugins Blosc build process will try to build its own zlib | ||
| # instead of allowing blosc to use its internal sources that are patched | ||
| # for MacOS. | ||
| - name: Build HDF5 and HDF5 plugins | ||
| run: | | ||
| cd ${{ github.workspace }}/hdf5 | ||
| mkdir build | ||
| cd build | ||
| cmake \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/hdf5_build \ | ||
| -DBUILD_STATIC_LIBS=OFF \ | ||
| -DHDF5_ALLOW_EXTERNAL_SUPPORT=GIT \ | ||
| -DHDF5_ENABLE_ZLIB_SUPPORT=OFF \ | ||
| -DZLIB_USE_EXTERNAL=${{ steps.set_zlibng_option.outputs.zlib_external }} \ | ||
| -DHDF5_USE_ZLIB_NG=${{ steps.set_zlibng_option.outputs.zlibng_option }} \ | ||
| -DHDF5_ENABLE_SZIP_SUPPORT=ON \ | ||
| -DSZIP_USE_EXTERNAL=ON \ | ||
| -DHDF5_ENABLE_PLUGIN_SUPPORT=ON \ | ||
| -DPLUGIN_USE_EXTERNAL=ON \ | ||
| -DPLUGIN_USE_LOCALCONTENT=OFF \ | ||
| -DH5PL_ALLOW_EXTERNAL_SUPPORT=GIT \ | ||
| -DH5PL_BUILD_TESTING=ON \ | ||
| -DH5PL_BUILD_EXAMPLES=ON \ | ||
| -DENABLE_BLOSC=ON \ | ||
| -DHDF_ENABLE_BLOSC_ZLIB_SUPPORT=OFF \ | ||
| -DENABLE_BLOSC2=ON \ | ||
| -DENABLE_BZIP2=ON \ | ||
| -DENABLE_JPEG=ON \ | ||
| -DENABLE_LZ4=ON \ | ||
| -DENABLE_LZF=ON \ | ||
| -DENABLE_ZFP=ON \ | ||
| -DENABLE_ZSTD=OFF \ | ||
| -DENABLE_BITGROOM=ON \ | ||
| -DENABLE_BITROUND=ON \ | ||
| -DENABLE_BSHUF=ON \ | ||
| .. | ||
| cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
| cmake --install . --config ${{ inputs.build_mode }} | ||
|
|
||
| - name: Test HDF5 and HDF5 plugins | ||
| shell: bash | ||
| run: | | ||
| cd "${{ github.workspace }}/hdf5/build" | ||
| ctest . --output-on-failure --parallel 3 -C ${{ inputs.build_mode }} | ||
|
|
||
| # Test building hdf5_plugins project against an already-installed HDF5. Filter | ||
| # libraries are built with FetchContent (git) while building hdf5_plugins. | ||
| build_and_test_git: | ||
| name: "MacOS Clang (hdf5_plugins built standalone; plugins built via git)" | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Get sources for HDF5 plugins project | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
|
|
||
| - name: Get sources for HDF5 | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| repository: HDFGroup/hdf5 | ||
| ref: "${{ inputs.hdf5_tag }}" | ||
| path: ${{ github.workspace }}/hdf5 | ||
|
|
||
| - name: Set zlib-ng option | ||
| id: set_zlibng_option | ||
| run: | | ||
| if test "${{ inputs.zlib_type }}" = "zlib-ng"; then | ||
| echo "zlibng_option=ON" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "zlibng_option=OFF" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Build HDF5 | ||
| run: | | ||
| cd ${{ github.workspace }}/hdf5 | ||
| mkdir build | ||
| cd build | ||
| cmake \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/hdf5_build \ | ||
| -DBUILD_STATIC_LIBS=OFF \ | ||
| -DHDF5_ALLOW_EXTERNAL_SUPPORT=GIT \ | ||
| -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ | ||
| -DZLIB_USE_EXTERNAL=ON \ | ||
| -DHDF5_USE_ZLIB_NG=${{ steps.set_zlibng_option.outputs.zlibng_option }} \ | ||
| -DHDF5_ENABLE_SZIP_SUPPORT=ON \ | ||
| -DSZIP_USE_EXTERNAL=ON \ | ||
| .. | ||
| cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
| cmake --install . --config ${{ inputs.build_mode }} | ||
|
|
||
| # NOTE: HDF_ENABLE_BLOSC_ZLIB_SUPPORT is set to OFF because otherwise | ||
| # the hdf5_plugins Blosc build process will try to build its own zlib | ||
| # instead of allowing blosc to use its internal sources that are patched | ||
| # for MacOS. | ||
| - name: Build HDF5 plugins project | ||
| run: | | ||
| mkdir "${{ runner.workspace }}/build" | ||
| cd "${{ runner.workspace }}/build" | ||
| cmake \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
| -DHDF5_DIR=${{ github.workspace }}/hdf5_build/cmake \ | ||
| -DH5PL_ALLOW_EXTERNAL_SUPPORT=GIT \ | ||
| -DH5PL_BUILD_TESTING=ON \ | ||
| -DH5PL_BUILD_EXAMPLES=ON \ | ||
| -DENABLE_BLOSC=ON \ | ||
| -DHDF_ENABLE_BLOSC_ZLIB_SUPPORT=OFF \ | ||
| -DENABLE_BLOSC2=ON \ | ||
| -DENABLE_BZIP2=ON \ | ||
| -DENABLE_JPEG=ON \ | ||
| -DENABLE_LZ4=ON \ | ||
| -DENABLE_LZF=ON \ | ||
| -DENABLE_ZFP=ON \ | ||
| -DENABLE_ZSTD=ON \ | ||
| -DENABLE_BITGROOM=ON \ | ||
| -DENABLE_BITROUND=ON \ | ||
| -DENABLE_BSHUF=ON \ | ||
| $GITHUB_WORKSPACE | ||
| cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
|
|
||
| - name: Test HDF5 plugins project | ||
| run: | | ||
| cd "${{ runner.workspace }}/build" | ||
| ctest . --output-on-failure --parallel 4 -C ${{ inputs.build_mode }} | ||
|
|
||
| # Test building hdf5_plugins project against an already-installed HDF5. Filter | ||
| # libraries are built with FetchContent (tgz) while building hdf5_plugins. | ||
| build_and_test_tgz: | ||
| name: "MacOS Clang (hdf5_plugins built standalone; plugins built via tgz)" | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Get sources for HDF5 plugins project | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
|
|
||
| - name: Get sources for HDF5 | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| repository: HDFGroup/hdf5 | ||
| ref: "${{ inputs.hdf5_tag }}" | ||
| path: ${{ github.workspace }}/hdf5 | ||
|
|
||
| - name: Set zlib-ng option | ||
| id: set_zlibng_option | ||
| run: | | ||
| if test "${{ inputs.zlib_type }}" = "zlib-ng"; then | ||
| echo "zlibng_option=ON" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "zlibng_option=OFF" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Build HDF5 | ||
| run: | | ||
| cd ${{ github.workspace }}/hdf5 | ||
| mkdir build | ||
| cd build | ||
| cmake \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/hdf5_build \ | ||
| -DBUILD_STATIC_LIBS=OFF \ | ||
| -DHDF5_ALLOW_EXTERNAL_SUPPORT=TGZ \ | ||
| -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ | ||
| -DZLIB_USE_EXTERNAL=ON \ | ||
| -DZLIB_USE_LOCALCONTENT=OFF \ | ||
| -DHDF5_USE_ZLIB_NG=${{ steps.set_zlibng_option.outputs.zlibng_option }} \ | ||
| -DHDF5_ENABLE_SZIP_SUPPORT=ON \ | ||
| -DSZIP_USE_EXTERNAL=ON \ | ||
| -DLIBAEC_USE_LOCALCONTENT=OFF \ | ||
| .. | ||
| cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
| cmake --install . --config ${{ inputs.build_mode }} | ||
|
|
||
| - name: Build HDF5 plugins project | ||
| run: | | ||
| mkdir "${{ runner.workspace }}/build" | ||
| cd "${{ runner.workspace }}/build" | ||
| cmake \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
| -DHDF5_DIR=${{ github.workspace }}/hdf5_build/cmake \ | ||
| -DH5PL_ALLOW_EXTERNAL_SUPPORT=TGZ \ | ||
| -DH5PL_BUILD_TESTING=ON \ | ||
| -DH5PL_BUILD_EXAMPLES=ON \ | ||
| -DENABLE_BLOSC=ON \ | ||
| -DENABLE_BLOSC2=ON \ | ||
| -DENABLE_BZIP2=ON \ | ||
| -DENABLE_JPEG=ON \ | ||
| -DENABLE_LZ4=ON \ | ||
| -DENABLE_LZF=ON \ | ||
| -DENABLE_ZFP=ON \ | ||
| -DENABLE_ZSTD=ON \ | ||
| -DENABLE_BITGROOM=ON \ | ||
| -DENABLE_BITROUND=ON \ | ||
| -DENABLE_BSHUF=ON \ | ||
| $GITHUB_WORKSPACE | ||
| cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
|
|
||
| - name: Test HDF5 plugins project | ||
| run: | | ||
| cd "${{ runner.workspace }}/build" | ||
| ctest . --output-on-failure --parallel 3 -C ${{ inputs.build_mode }} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZSTD currently has a CMake logic issue preventing building with FetchContent