Modernize HighFive usage. #1839
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: Run tests | |
on: [pull_request, push] | |
env: | |
apt_options: -o Acquire::Retries=3 | |
jobs: | |
build: | |
name: Run tests on ${{ matrix.os }}.${{ matrix.compiler.CC }} | |
runs-on: ${{ matrix.os }} | |
# Run on external PRs, but not internal PRs as they'll be run by the push | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
compiler: | |
- {CC: clang, CXX: clang++} | |
- {CC: gcc, CXX: g++} | |
exclude: | |
- os: macos-latest | |
compiler: {CC: gcc, CXX: g++} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install packages on Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get ${{env.apt_options}} update -y | |
sudo apt-get ${{env.apt_options}} install -y build-essential libhdf5-dev language-pack-de | |
- name: Install packages on MacOS | |
if: runner.os == 'macOS' | |
run: | | |
# { work around https://github.com/actions/setup-python/issues/577 | |
#brew update | |
#brew --version | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
# } | |
brew install cmake || true # macos image has cmake installed, but a new version may exist; ignore it if so | |
brew install hdf5 | |
- name: Build and run unittests | |
env: | |
CC: ${{ matrix.compiler.CC }} | |
CXX: ${{ matrix.compiler.CXX }} | |
run: | | |
locale -a | |
./ci/python_test.sh | |
./ci/cpp_test.sh | |
./ci/cpp_test.sh "-DMORPHIO_USE_DOUBLE=ON" |