Skip to content

Commit

Permalink
WIP: Workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Dec 6, 2024
1 parent fc31a40 commit 7729228
Showing 1 changed file with 83 additions and 84 deletions.
167 changes: 83 additions & 84 deletions .github/workflows/multithread_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test Multithreaded HDF5 Library
name: Build and Test Multithreaded HDF5

on:
push:
Expand All @@ -7,7 +7,6 @@ on:

env:
HDF5TestExpress: 1
num_threads: 16

jobs:
build-and-test:
Expand All @@ -17,6 +16,17 @@ jobs:
api_tests: ["--enable-api-tests", "--disable-api-tests"]
multi_thread: ["--enable-multithread --disable-hl", "--disable-multithread --enable-threadsafe --disable-hl", "--disable-multithread --disable-threadsafe"]
build_mode: ["production", "debug"]
include:
# Non-multi thread library builds should only run non-threaded
- multi_thread: "--disable-multithread --enable-threadsafe --disable-hl"
test_thread_counts: [""]

- multi_thread: "--disable-multithread --disable-threadsafe"
test_thread_counts: [""]

# Only multi-threaded builds should run with -maxthreads (>0)
- multi_thread: "--enable-multithread --disable-hl"
test_thread_counts: ["", "-maxthreads 1", "-maxthreads 16"]
fail-fast: false

steps:
Expand All @@ -39,50 +49,28 @@ jobs:
run: |
make -j
- name: API Tests - Native (Non-threaded)
- name: API Tests - Native
if: matrix.api_tests == '--enable-api-tests'
working-directory: ${{github.workspace}}
run: |
valgrind ./test/API/h5_api_test
- name: API Tests (Single-Threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
run: |
valgrind ./test/API/h5_api_test -maxthreads 1
- name: API Tests (Multi-Threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - MT Native Wrapper (Non-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_native_wrapper_vol_connector"
run: |
valgrind ./test/API/h5_api_test
- name: API Tests - MT Native Wrapper (Single-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_native_wrapper_vol_connector"
run: |
valgrind ./test/API/h5_api_test -maxthreads 1
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT Native Wrapper (Multi-threaded)
- name: API Tests - MT Native Wrapper
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_native_wrapper_vol_connector"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT Passthru Wrapper (Non-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
Expand All @@ -91,114 +79,125 @@ jobs:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT Passthru Wrapper (Single-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads 1
- name: API Tests - MT Passthru Wrapper (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - ST to Native (Multi-threaded)
- name: API Tests - ST to Native
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT to Native (Multi-threaded)
- name: API Tests - MT to Native
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT to MT Native Wrapper (Multi-threaded)
- name: API Tests - MT to MT Native Wrapper
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=162\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - ST to MT Native Wrapper (Multi-threaded)
- name: API Tests - ST to MT Native Wrapper
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=162\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT to ST to Native (Multi-threaded)
- name: API Tests - MT to ST to Native
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=1\\;under_info={under_vol=0\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - ST to MT to Native (Multi-threaded)
- name: API Tests - ST to MT to Native
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=163\\;under_info={under_vol=0\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - MT to ST to MT Native Wrapper (Multi-threaded)
- name: API Tests - MT to ST to MT Native Wrapper
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=1\\;under_info={under_vol=162\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: API Tests - ST to MT to MT Native Wrapper (Multi-threaded)
- name: API Tests - ST to MT to MT Native Wrapper
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=163\\;under_info={under_vol=162\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: MT VL Tests (Non-threaded)
working-directory: ${{github.workspace}}/test/
run: |
valgrind ./threads/testmthdf5
- name: MT VL Tests (Single-threaded)
if: matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}/test/
run: |
valgrind ./threads/testmthdf5 -maxthreads 1
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: API Tests with $thread_args"
valgrind ./test/API/h5_api_test $thread_args
echo "::endgroup::"
done
- name: MT VL Tests (Multi-threaded)
- name: MT VL Tests
if: matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}/test/
run: |
valgrind ./threads/testmthdf5 -maxthreads ${{ env.num_threads }}
for thread_args in ${{ toJson(matrix.test_thread_counts) }}; do
echo "::group:: MT HDF5 Tests with $thread_args"
valgrind ./threads/testmthdf5 $thread_args
echo "::endgroup::"
done
- name: Other HDF5 Tests
working-directory: ${{github.workspace}}
Expand Down

0 comments on commit 7729228

Please sign in to comment.