Skip to content
9 changes: 5 additions & 4 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Read inputs
id: getinputs
run: |
echo "INPUTS_IGNORE=${{ inputs.use_ignore }}" >> $GITHUB_OUTPUT
echo "INPUTS_IGNORE=${{ inputs.use_ignore || 'check' }}" >> $GITHUB_OUTPUT

- run: echo "use_ignore is ${{ steps.getinputs.outputs.INPUTS_IGNORE }}."

Expand All @@ -75,7 +75,7 @@ jobs:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_hdf: ${{ needs.get-old-names.outputs.hdf5-name }}
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) }}
if: ${{ (github.event_name != 'pull_request') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) }}

call-workflow-ctest:
needs: [get-old-names, call-workflow-tarball]
Expand Down Expand Up @@ -108,6 +108,7 @@ jobs:
use_hdf: ${{ needs.get-old-names.outputs.hdf5-name }}
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_environ: snapshots
if: ${{ github.event_name != 'pull_request' }}

call-workflow-release:
needs: [get-old-names, call-workflow-tarball, call-workflow-ctest]
Expand All @@ -120,7 +121,7 @@ jobs:
file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
use_tag: snapshot
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) }}
if: ${{ (github.event_name != 'pull_request') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) }}

call-workflow-remove:
needs: [get-old-names, call-workflow-tarball, call-workflow-ctest, call-workflow-release]
Expand All @@ -131,7 +132,7 @@ jobs:
file_base: ${{ needs.get-old-names.outputs.plugin-name }}
use_tag: snapshot
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) && (needs.get-old-names.outputs.hdf5-name != needs.call-workflow-tarball.outputs.file_base) }}
if: ${{ (github.event_name != 'pull_request') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) && (needs.get-old-names.outputs.hdf5-name != needs.call-workflow-tarball.outputs.file_base) }}

call-workflow-versions:
uses: ./.github/workflows/check-releases.yml
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
name: Check for recent commits
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.check-new-commits.outputs.has-new-commits }}
has_changes: ${{ steps.check-new-commits.outputs.has-new-commits || steps.set-pr-commits.outputs.has-new-commits }}
branch_ref: ${{ steps.get-branch-name.outputs.BRANCH_REF }}
branch_sha: ${{ steps.get-branch-sha.outputs.BRANCH_SHA }}
steps:
Expand Down Expand Up @@ -73,8 +73,14 @@ jobs:
uses: adriangl/check-new-commits-action@v1
with:
seconds: 86400 # One day in seconds
branch: '${{ steps.get-branch-name.outputs.branch_ref }}'
if: ${{ (inputs.use_environ == 'snapshots' && inputs.use_ignore == 'check') }}
branch: '${{ steps.get-branch-name.outputs.BRANCH_REF }}'
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ (inputs.use_environ == 'snapshots' && inputs.use_ignore == 'check' && github.event_name != 'pull_request') }}

- name: Set has-new-commits for pull requests
id: set-pr-commits
run: echo "has-new-commits=true" >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'pull_request' }}

- run: echo "You have ${{ steps.check-new-commits.outputs.new-commits-number }} new commit(s) in ${{ steps.get-branch-name.outputs.BRANCH_REF }} ✅!"
if: ${{ steps.check-new-commits.outputs.has-new-commits == 'true' }}
Expand All @@ -95,7 +101,7 @@ jobs:
uses: actions/checkout@v4.1.7
with:
path: hdfsrc
ref: '${{needs.check_commits.outputs.branch_ref }}'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || needs.check_commits.outputs.branch_ref }}

- name: Retrieve version
id: version
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Select HDF5 Filter Plugins Repository

[![Daily Build](https://github.com/HDFGroup/hdf5_plugins/actions/workflows/daily-build.yml/badge.svg)](https://github.com/HDFGroup/hdf5_plugins/actions/workflows/daily-build.yml)

This repository contains a select number of registered HDF5® filter plugins for use in HDF Group's development and testing activities of the HDF5® library. The HDF Group is the developer, maintainer, and steward of the HDF5® software. Find more
information about The HDF Group, the HDF5® Community, and other HDF5® software projects,
tools, and services at [The HDF Group's website](https://www.hdfgroup.org/).
Expand Down
19 changes: 19 additions & 0 deletions config/cmake/binex/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ foreach (example ${dyn_examples} ${extra_examples})
endforeach ()

if (H5PL_BUILD_TESTING)
# Set plugin path relative to PROJECT_SOURCE_DIR
# Windows: HDF5/HDFPLExamples/example -> ../../lib/plugin
# Unix/Mac: HDF5/share/HDFPLExamples/example -> ../../../lib/plugin
if (WIN32)
set (PLUGIN_RELATIVE_PATH "../../lib/plugin")
else ()
set (PLUGIN_RELATIVE_PATH "../../../lib/plugin")
endif ()

macro (ADD_H5_TEST testname)
add_test (
NAME ${testname}-clearall
Expand Down Expand Up @@ -102,6 +111,8 @@ if (H5PL_BUILD_TESTING)
-D "TEST_ERRREF=1"
-D "GREP_ERRREF=Filter present but encoding disabled"
-D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${PROJECT_SOURCE_DIR}/${PLUGIN_RELATIVE_PATH}"
-P "${H5PL_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (${testname}-ERR PROPERTIES DEPENDS ${testname}-clearall)
Expand All @@ -123,6 +134,8 @@ if (H5PL_BUILD_TESTING)
-D "TEST_OUTPUT=${testname}.out"
-D "TEST_REFERENCE=${testname}.tst"
-D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${PROJECT_SOURCE_DIR}/${PLUGIN_RELATIVE_PATH}"
-P "${H5PL_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (${testname} PROPERTIES DEPENDS ${testname}-clearall)
Expand All @@ -142,6 +155,8 @@ if (H5PL_BUILD_TESTING)
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${testname}.ddl"
-D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${PROJECT_BINARY_DIR}/../plugins"
-P "${H5PL_RESOURCES_DIR}/runTest.cmake"
)
else ()
Expand All @@ -158,6 +173,8 @@ if (H5PL_BUILD_TESTING)
-D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${testname}.ddl"
-D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${PROJECT_SOURCE_DIR}/${PLUGIN_RELATIVE_PATH}"
-P "${H5PL_RESOURCES_DIR}/runTest.cmake"
)
else ()
Expand All @@ -174,6 +191,8 @@ if (H5PL_BUILD_TESTING)
-D "TEST_MASK_MOD=1"
-D "TEST_REFERENCE=${testname}.ddl"
-D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${PROJECT_SOURCE_DIR}/${PLUGIN_RELATIVE_PATH}"
-P "${H5PL_RESOURCES_DIR}/runTest.cmake"
)
endif ()
Expand Down
Loading