Version 6.0.1 #237
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ConorMacBride/install-package@v1 | |
with: | |
apt: lcov libfmt-dev libhdf5-dev libeigen3-dev python3-pybind11 | |
brew: cmake lcov fmt hdf5@1.10 eigen pybind11 | |
- name: Install python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install flake8 pytest | |
- name: Set up env (macos) | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
echo "/usr/local/opt/hdf5@1.10/bin" >> $GITHUB_PATH | |
echo "CMAKE_PREFIX_PATH=/usr/local/opt/hdf5@1.10" >> $GITHUB_ENV | |
- name: Configure | |
run: | | |
cmake -S . -B ${{ github.workspace }}/build \ | |
-DFPROPS_BUILD_TESTS=YES \ | |
-DFPROPS_CODE_COVERAGE=YES | |
- name: Build | |
run: make -C ${{ github.workspace }}/build | |
- name: Run tests | |
run: make -C ${{ github.workspace }}/build test ARGS='-V' | |
- name: Generate code coverage | |
if: startsWith(matrix.os, 'ubuntu') | |
run: make -C ${{ github.workspace }}/build coverage | |
- name: Upload coverage artifact | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{ matrix.os }} | |
path: ${{ github.workspace }}/build/coverage.info | |
upload-to-codecov: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |