Implement int-to-real conversion test #47
Workflow file for this run
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
name: HDF5 API test CI | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
# Using concurrency to cancel any in-progress job or run | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
name: | |
- "Windows MSVC" | |
- "Ubuntu GCC" | |
- "Ubuntu GCC parallel (build only)" | |
- "MacOS Clang" | |
build_mode: | |
- text: " REL" | |
cmake: "Release" | |
- text: " DBG" | |
cmake: "Debug" | |
include: | |
# Exclude Windows for now since CMake code throws a | |
# fatal error about being unsupported on Windows. | |
# Unclear if the tests can be supported yet, but they | |
# should run fine on Windows. However, building of the | |
# test driver code needs to be updated to be optional | |
# Windows w/ MSVC + CMake | |
#- name: "Windows MSVC" | |
# os: windows-2022 | |
# toolchain: "" | |
# parallel: OFF | |
# generator: "-G \"Visual Studio 17 2022\" -A x64" | |
# run_tests: true | |
# Linux (Ubuntu) w/ GCC + CMake | |
- name: "Ubuntu GCC" | |
os: ubuntu-latest | |
parallel: OFF | |
toolchain: "config/toolchain/gcc.cmake" | |
generator: "-G Ninja" | |
run_tests: true | |
# Linux (Ubuntu) w/ GCC + CMake (parallel) | |
- name: "Ubuntu GCC parallel (build only)" | |
os: ubuntu-latest | |
parallel: ON | |
toolchain: "config/toolchain/gcc.cmake" | |
generator: "-G Ninja" | |
run_tests: false | |
# MacOS w/ Clang + CMake | |
- name: "MacOS Clang" | |
os: macos-11 | |
parallel: OFF | |
toolchain: "config/toolchain/clang.cmake" | |
generator: "-G Ninja" | |
run_tests: true | |
# | |
# SPECIAL BUILDS | |
# | |
# -Werror Debug build | |
- name: "Ubuntu GCC -Werror Debug (build only)" | |
os: ubuntu-latest | |
parallel: OFF | |
toolchain: "" | |
generator: "-G Ninja" | |
flags: "-Wall -Wextra -Werror" | |
run_tests: false | |
build_mode: | |
text: " DBG" | |
cmake: "Debug" | |
# -Werror Release build | |
- name: "Ubuntu GCC -Werror Release (build only)" | |
os: ubuntu-latest | |
parallel: OFF | |
toolchain: "" | |
generator: "-G Ninja" | |
flags: "-Wall -Wextra -Werror" | |
run_tests: false | |
build_mode: | |
text: " REL" | |
cmake: "Release" | |
# -Werror Debug parallel build | |
- name: "Ubuntu GCC -Werror Debug parallel (build only)" | |
os: ubuntu-latest | |
parallel: ON | |
toolchain: "" | |
generator: "-G Ninja" | |
flags: "-Wall -Wextra -Werror" | |
run_tests: false | |
build_mode: | |
text: " DBG" | |
cmake: "Debug" | |
# -Werror Release parallel build | |
- name: "Ubuntu GCC -Werror Release parallel (build only)" | |
os: ubuntu-latest | |
parallel: ON | |
toolchain: "" | |
generator: "-G Ninja" | |
flags: "-Wall -Wextra -Werror" | |
run_tests: false | |
build_mode: | |
text: " REL" | |
cmake: "Release" | |
exclude: | |
# Exclude Windows for now since CMake code throws a | |
# fatal error about being unsupported on Windows. | |
# Unclear if the tests can be supported yet, but they | |
# should run fine on Windows. However, building of the | |
# test driver code needs to be updated to be optional | |
- name: "Windows MSVC" | |
# Only test a few debug builds | |
- name: "Windows MSVC" | |
build_mode: | |
text: " DBG" | |
cmake: "Debug" | |
- name: "MacOS Clang" | |
build_mode: | |
text: " DBG" | |
cmake: "Debug" | |
# Sets the job's name from the properties | |
name: "${{ matrix.name }}${{ matrix.build_mode.text }}" | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Dump matrix context | |
run: echo '${{ toJSON(matrix) }}' | |
- name: Checkout API tests | |
uses: actions/checkout@v3 | |
with: | |
path: api-tests | |
- name: Checkout HDF5 | |
uses: actions/checkout@v3 | |
with: | |
repository: HDFGroup/hdf5 | |
path: hdf5 | |
- name: Install Dependencies (Linux) | |
run: sudo apt-get install ninja-build | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install Dependencies (Linux, parallel) | |
run: | | |
sudo apt update | |
sudo apt install ninja-build | |
sudo apt install openmpi-bin openmpi-common mpi-default-dev | |
echo "CC=mpicc" >> $GITHUB_ENV | |
sudo apt install libaec0 libaec-dev | |
if: (matrix.parallel == 'ON') | |
- name: Install Dependencies (Windows) | |
run: choco install ninja | |
if: matrix.os == 'windows-latest' | |
- name: Install Dependencies (macOS) | |
run: brew install ninja | |
if: matrix.os == 'macos-11' | |
- name: Set environment for MSVC (Windows) | |
run: | | |
# Set these environment variables so CMake picks the correct compiler | |
echo "CXX=cl.exe" >> $GITHUB_ENV | |
echo "CC=cl.exe" >> $GITHUB_ENV | |
if: matrix.os == 'windows-latest' | |
- name: Install HDF5 | |
run: | | |
cd "$GITHUB_WORKSPACE/hdf5" | |
mkdir "build" | |
cd "build" | |
cmake ${{ matrix.generator }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} \ | |
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/hdf5_build \ | |
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DBUILD_STATIC_LIBS=OFF \ | |
-DHDF5_ENABLE_ALL_WARNINGS=ON \ | |
-DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \ | |
.. | |
cmake --build . --parallel 3 --config ${{ matrix.build_mode.cmake }} | |
cmake --install . --config ${{ matrix.build_mode.cmake }} | |
shell: bash | |
- name: Install API tests | |
run: | | |
cd "$GITHUB_WORKSPACE/api-tests" | |
mkdir "build" | |
cd "build" | |
cmake ${{ matrix.generator }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} \ | |
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/api_tests_build \ | |
-DCMAKE_C_FLAGS="${{ matrix.flags }}" \ | |
-DHDF5_DIR=$GITHUB_WORKSPACE/hdf5_build \ | |
-DHDF5_VOL_TEST_ENABLE_PART=ON \ | |
-DHDF5_VOL_TEST_ENABLE_PARALLEL=${{ matrix.parallel }} \ | |
-DHDF5_VOL_TEST_ENABLE_ASYNC=ON \ | |
.. | |
cmake --build . --parallel 3 --config ${{ matrix.build_mode.cmake }} | |
shell: bash | |
- name: Run API tests | |
run: | | |
cd "$GITHUB_WORKSPACE/api-tests/build" | |
ctest --build . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V | |
if: (matrix.run_tests) |