Bump minimum required CMake version, and only include CPM if needed (… #22
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: Coverage | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_and_test: | |
name: Analyze test coverage with XSIMD version ${{ matrix.xsimd_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # show all errors for each platform (vs. cancel jobs on error) | |
matrix: | |
xsimd_version: ["", "8.0.5"] | |
steps: | |
- name: Install Linux Deps | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt install lcov | |
lcov --version | |
- name: Get latest CMake | |
uses: lukka/get-cmake@latest | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Configure | |
shell: bash | |
run: cmake -Bbuild -DCHOWDSP_WDF_CODE_COVERAGE=ON -DCHOWDSP_WDF_TEST_WITH_XSIMD_VERSION="${{ matrix.xsimd_version }}" | |
- name: Build | |
shell: bash | |
run: cmake --build build --parallel 4 --target chowdsp_wdf_tests | |
- name: Test | |
shell: bash | |
run: ./build/test-binary/chowdsp_wdf_tests | |
- name: Collect Coverage Data | |
shell: bash | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '/Applications/Xcode*' '*tests*' --output-file coverage.info | |
- name: Report Coverage Data | |
shell: bash | |
run: lcov --list coverage.info | |
- name: Upload Coverage Data | |
shell: bash | |
run: bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |