Add PROFILE_FLAGS to profileable targets #130
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: | |
strategy: | |
matrix: | |
include: | |
- toolchain: 1.73.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
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: Add component llvm-tools-preview | |
run: sudo /home/runner/.cargo/bin/rustup component add llvm-tools-preview | |
- name: Run all tests on ${{ matrix.toolchain }} toolchain with profiling | |
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH PROFILE=1 make -f Makefile sudo_test # yamllint disable rule:line-length | |
- name: Merge raw coverage files | |
run: | | |
sudo llvm-profdata merge --sparse *.profraw -o result.profdata | |
sudo rm *.profraw | |
- name: Generate coverage report | |
run: sudo llvm-cov report -object $(find target/debug/deps/ -regex ".*devicemapper-[0-9a-f]*") -instr-profile=result.profdata --summary-only |