support coverage measurements #18
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: Codechecker | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
codechecker: | |
runs-on: ubuntu-latest | |
steps: | |
# Check YOUR project out! | |
- name: "Check out repository" | |
uses: actions/checkout@v2 | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install codechecker | |
run: pip install CodeChecker | |
- name: "Prepare build" | |
run: | | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: "Analyze" | |
run: | | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --target analyze | |
- name: "Create report" | |
# allow job to fail, there is a chance these checks are too invasive and to strict. | |
continue-on-error: true | |
run: | | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --target analyze_report |