Turn on parallel CI tests in Autotools & CMake (#4573)

This commit is contained in:
Dana Robinson 2024-08-26 09:32:44 -07:00 committed by GitHub
parent d0fe57624f
commit fe7dca0683
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 2 deletions

View File

@ -50,8 +50,9 @@ jobs:
- name: Get Sources
uses: actions/checkout@v4.1.7
# AUTOTOOLS CONFIGURE
- name: Autotools Configure
env:
NPROCS: 2
run: |
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
@ -71,7 +72,28 @@ jobs:
--with-szlib=yes
shell: bash
# BUILD
- name: Autotools Build
run: make -j3
working-directory: ${{ runner.workspace }}/build
# ph5diff tests are in the tools/tests directory so they will get run
# here, so leave NPROCS set here as well
- name: Autotools Run Tests
env:
NPROCS: 2
run: |
cd test && make check -j2 && cd ..
cd tools && make check -j2 && cd ..
cd hl && make check -j2 && cd ..
cd fortran/test && make check -j2 && cd ../..
working-directory: ${{ runner.workspace }}/build
if: ${{ inputs.thread_safety == 'disable' }}
- name: Autotools Run Parallel Tests
env:
NPROCS: 2
run: |
cd testpar && make check && cd ..
cd fortran/testpar && make check -j2 && cd ../..
working-directory: ${{ runner.workspace }}/build
if: ${{ inputs.thread_safety == 'disable' }}

View File

@ -62,3 +62,16 @@ jobs:
- name: CMake Build
run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build
#
# RUN TESTS
#
- name: CMake Run Tests
run: ctest . -E MPI_TEST --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
if: ${{ matrix.run_tests && (inputs.thread_safety != 'TS') }}
- name: CMake Run Parallel Tests
run: ctest . -R MPI_TEST -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
if: ${{ matrix.run_tests && (inputs.thread_safety != 'TS') }}