From 5b748284bad13ab0e9d3fa2205f2ac575f0ba781 Mon Sep 17 00:00:00 2001 From: BryanFRD Date: Wed, 28 Oct 2026 08:23:57 +0100 Subject: [PATCH 1/2] ci(coverage): run tarpaulin with the llvm engine The ptrace engine segfaulted mid-run on the v7.35.0 release commit, which changes no code; the previous run on the same tree passed. The LLVM engine instruments at compile time instead of tracing the test process, which removes this class of flaky segfault. Signed-off-by: BryanFRD --- .github/workflows/sonarqube.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 0951e8b6..7c452649 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -56,7 +56,7 @@ jobs: with: tool: cargo-tarpaulin - name: Generate coverage - run: cargo tarpaulin --out xml --skip-clean + run: cargo tarpaulin --engine llvm --out xml --skip-clean - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: coverage-cobertura From 189b1077057269a6165f2adb5c7f0ad86c69d5dc Mon Sep 17 00:00:00 2001 From: BryanFRD Date: Wed, 28 Oct 2026 08:48:16 +0100 Subject: [PATCH 2/2] ci(coverage): generate coverage with cargo-llvm-cov Tarpaulin's llvm engine fails to parse the profiles rustc 1.99 writes ("consistency check for reading counts failed"), and its ptrace engine segfaults intermittently. cargo-llvm-cov reads profiles with the toolchain's own llvm-tools, so the format always matches. The cobertura report keeps repo-relative src/ paths, so Sonar and Codecov consume it unchanged. Signed-off-by: BryanFRD --- .github/workflows/sonarqube.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 7c452649..95002eab 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -43,7 +43,7 @@ jobs: # Coverage lives here rather than in ci.yml because the reusable scan # downloads the report from an artifact in the same run, and artifacts do - # not cross workflow runs. Tarpaulin is slow, so it runs once and feeds + # not cross workflow runs. Coverage is slow, so it runs once and feeds # both Sonar and Codecov instead of once per workflow. coverage: name: Coverage @@ -51,12 +51,14 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + components: llvm-tools-preview - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 - uses: taiki-e/install-action@67729d5c413db75907f0ad1e39bb04b9c868ff60 # v2 with: - tool: cargo-tarpaulin + tool: cargo-llvm-cov - name: Generate coverage - run: cargo tarpaulin --engine llvm --out xml --skip-clean + run: cargo llvm-cov --cobertura --output-path cobertura.xml - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: coverage-cobertura