Add PROFILE_FLAGS to profileable targets #133
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 | |
# yamllint disable rule:line-length | |
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }} | |
- name: Add component cargo | |
run: sudo /home/runner/.cargo/bin/rustup component add cargo | |
- name: Install cargo-binutils | |
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH PROFILE=1 cargo install cargo-binutils | |
- 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 | |
- name: Merge raw coverage files | |
run: | | |
sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH rust-profdata merge --sparse *.profraw -o result.profdata | |
sudo rm *.profraw | |
- name: Generate coverage report | |
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH rust-cov report -object $(find target/debug/deps/ -regex ".*devicemapper-[0-9a-f]*") -instr-profile=result.profdata --summary-only |