forked from HDFGroup/hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7846a6
commit ad0c441
Showing
2 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,114 @@ | ||
name: Test HDF5 ADIOS2 VOL | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_mode: | ||
description: "CMake Build type" | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_and_test: | ||
name: Test HDF5 ADIOS2 VOL connector | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-get install automake autoconf libtool libtool-bin libopenmpi-dev | ||
# TODO | ||
#- name: Checkout HDF5 | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# repository: HDFGroup/hdf5 | ||
# path: hdf5 | ||
# TODO | ||
|
||
# TODO | ||
- name: Checkout HDF5 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: jhendersonHDF/hdf5 | ||
path: hdf5 | ||
ref: api_tests_dev | ||
# TODO | ||
|
||
- name: Configure HDF5 | ||
shell: bash | ||
run: | | ||
mkdir ${{ github.workspace }}/hdf5/build | ||
cd ${{ github.workspace }}/hdf5/build | ||
cmake -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/hdf5_build \ | ||
-DBUILD_STATIC_LIBS=OFF \ | ||
-DHDF5_TEST_API:BOOL=ON \ | ||
-DHDF5_TEST_API_ENABLE_ASYNC:BOOL=ON \ | ||
-DHDF5_ENABLE_PARALLEL:BOOL=ON \ | ||
-DHDF5_ENABLE_THREADSAFE:BOOL=ON \ | ||
-DALLOW_UNSUPPORTED:BOOL=ON \ | ||
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ | ||
${{ github.workspace }}/hdf5 | ||
cat src/libhdf5.settings | ||
- name: Build and install HDF5 | ||
shell: bash | ||
working-directory: ${{ github.workspace }}/hdf5/build | ||
run: | | ||
cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
cmake --install . | ||
echo "LD_LIBRARY_PATH=${{ github.workspace }}/hdf5/build/bin" >> $GITHUB_ENV | ||
echo "PATH=${{ runner.workspace }}/hdf5_build/bin:${PATH}" >> $GITHUB_ENV | ||
# Since the HDF5 ADIOS2 VOL connector is part of the ADIOS2 repository, | ||
# it is difficult to use CMake's FetchContent functionality to fetch | ||
# and build the ADIOS2 connector. Also, since building of ADIOS2 takes | ||
# a while, it isn't ideal to have to rebuild it every time we want to | ||
# test against changes in HDF5 or the VOL connector. Therefore, just | ||
# use a fixed commit for the build of ADIOS2 so we can cache that and | ||
# still test the connector against changes in HDF5. | ||
- name: Cache ADIOS2 (3adf20a) installation | ||
id: cache-adios2-3adf20a | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ runner.workspace }}/adios2-3adf20a-install | ||
key: ${{ runner.os }}-${{ runner.arch }}-adios2-3adf20a929b69c23312a6b5f3cccc49376df77e8-${{ inputs.build_mode }}-cache | ||
|
||
- if: ${{ steps.cache-adios2-3adf20a.outputs.cache-hit != 'true' }} | ||
name: Checkout ADIOS2 (3adf20a) | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ornladios/ADIOS2 | ||
ref: 3adf20a929b69c23312a6b5f3cccc49376df77e8 | ||
path: adios2 | ||
|
||
- if: ${{ steps.cache-adios2-3adf20a.outputs.cache-hit != 'true' }} | ||
name: Install ADIOS2 (3adf20a) | ||
env: | ||
CXX: mpic++ | ||
CC: mpicc | ||
run: | | ||
mkdir adios2/build | ||
cd adios2/build | ||
cmake -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/adios2-3adf20a-install \ | ||
-DADIOS2_USE_HDF5:BOOL=ON \ | ||
-DHDF5_PREFER_PARALLEL=true \ | ||
-DHDF5_ROOT=${{ runner.workspace }}/hdf5_build/ \ | ||
.. | ||
make -j2 | ||
sudo make -j2 install | ||
- name: Set environment variables for tests | ||
run: | | ||
echo "HDF5_PLUGIN_PATH=${{ runner.workspace }}/adios2-3adf20a-install/lib" >> $GITHUB_ENV | ||
echo "HDF5_VOL_CONNECTOR=ADIOS2_VOL" >> $GITHUB_ENV | ||
- name: Test HDF5 ADIOS2 VOL connector with HDF5 API tests | ||
working-directory: ${{ github.workspace }}/hdf5/build | ||
run: | | ||
ctest --build-config ${{ inputs.build_mode }} -VV -R "h5_api" . |