Add PROFILE_FLAGS to profileable targets #118
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: devicemapper weekly | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'CHANGES.txt' | |
- '**/README.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'CHANGES.txt' | |
- '**/README.md' | |
schedule: | |
- cron: 20 3 * * 2 | |
workflow_dispatch: | |
jobs: | |
# PYTHON CHECKS ON NEXT FEDORA PYTHON AND PYTHON TOOLS VERSION | |
next-fedora-python-checks: | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
- dependencies: yamllint | |
task: make -f Makefile yamllint | |
runs-on: ubuntu-20.04 | |
container: fedora:39 # NEXT DEVELOPMENT ENVIRONMENT | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: > | |
dnf install -y | |
make | |
${{ matrix.dependencies }} | |
- name: ${{ matrix.task }} | |
run: ${{ matrix.task }} | |
coverage: | |
runs-on: ubuntu-20.04 | |
container: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: cargo | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get -q update | |
sudo apt-get -y install libdevmapper-dev | |
- name: Set toolchain override with sudo | |
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }} # yamllint disable rule:line-length | |
- name: Run all tests on ${{ matrix.toolchain }} toolchain | |
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH PROFILE=1 make -f Makefile sudo_test # yamllint disable rule:line-length | |
- name: Merge raw coverrage files | |
run: | | |
llvm-profdata merge --sparse *.profraw -o result.profdata | |
rm *.profraw | |
- name: Generate coverage report | |
run: llvm-cov report -object $(find target/debug/deps/ -regex ".*devicemapper-[0-9a-f]*") -instr-profile=result.profdata --summary-only |