Add max version to placate CMake #80
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
tests: RMF | |
build: Debug | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
tests: RMF | |
build: Release | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: 'libhdf5-dev liblog4cxx-dev' | |
flags: '--coverage' | |
tests: RMF | |
build: Debug | |
- os: macos-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
tests: RMF | |
build: Release | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq libboost-all-dev swig libc-dbg ${{ matrix.install }} | |
pip install coverage | |
- name: Install dependencies (Mac) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install swig boost log4cxx ${{ matrix.install }} | |
pip install coverage | |
- name: Build and test | |
run: | | |
mkdir build | |
cd build | |
../tools/coverage/setup.py | |
PYTHONPATH=`pwd`/coverage cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.build }}" -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.flags }}" -DCMAKE_MODULE_LINKER_FLAGS="${{ matrix.flags }}" -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.flags }}" | |
make -j 2 | |
ctest -j 2 --output-on-failure -L ${{ matrix.tests }} | |
- name: Combine coverage | |
run: | | |
cd build/coverage | |
coverage combine && mv .coverage ../.. | |
- uses: codecov/codecov-action@v1 |