From 193846c8c355e3a49928d54848ac75646f0170fd Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 3 Jan 2022 16:49:25 +0100 Subject: [PATCH 1/6] fix: Pin last known good nightly for Code Coverage --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1548d75b..af4db768 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,10 @@ jobs: - run: make testfast + # Code coverage instrumentation is current broken because Rust nightly seems + # to generate broken profraw files that fail processing with LLVMs tools: + # `malformed instrumentation profile data: insufficient padding` + # The last known good nightly was 2021-08-20 codecov: name: Code Coverage runs-on: ubuntu-latest @@ -135,7 +139,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: nightly-2021-08-20 components: llvm-tools-preview override: true From e5c829996dc5383e46575ce468482b38bc213a92 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 3 Jan 2022 16:55:37 +0100 Subject: [PATCH 2/6] just disable it completely --- .github/workflows/ci.yml | 51 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af4db768..e28c9b01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,28 +127,29 @@ jobs: # Code coverage instrumentation is current broken because Rust nightly seems # to generate broken profraw files that fail processing with LLVMs tools: # `malformed instrumentation profile data: insufficient padding` - # The last known good nightly was 2021-08-20 - codecov: - name: Code Coverage - runs-on: ubuntu-latest - continue-on-error: true # well, its nightly and highly experimental - - steps: - - uses: actions/checkout@v2 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2021-08-20 - components: llvm-tools-preview - override: true - - - uses: Swatinem/rust-cache@v1 - - - uses: Swatinem/fucov@v1 - with: - args: --workspace --all-features - - - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 - with: - directory: coverage + # So just completely disable this job for now, and re-enable at a later point + # once Rust nightly is fixed. + # codecov: + # name: Code Coverage + # runs-on: ubuntu-latest + # continue-on-error: true # well, its nightly and highly experimental + + # steps: + # - uses: actions/checkout@v2 + + # - uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: nightly + # components: llvm-tools-preview + # override: true + + # - uses: Swatinem/rust-cache@v1 + + # - uses: Swatinem/fucov@v1 + # with: + # args: --workspace --all-features + + # - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 + # with: + # directory: coverage From 054fb15740544f549ca497305e85bb5ddeea284c Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Thu, 6 Jan 2022 17:27:48 +0100 Subject: [PATCH 3/6] try switching to cargo-llvm-cov --- .github/workflows/ci.yml | 57 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e28c9b01..e0d884df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,32 +124,31 @@ jobs: - run: make testfast - # Code coverage instrumentation is current broken because Rust nightly seems - # to generate broken profraw files that fail processing with LLVMs tools: - # `malformed instrumentation profile data: insufficient padding` - # So just completely disable this job for now, and re-enable at a later point - # once Rust nightly is fixed. - # codecov: - # name: Code Coverage - # runs-on: ubuntu-latest - # continue-on-error: true # well, its nightly and highly experimental - - # steps: - # - uses: actions/checkout@v2 - - # - uses: actions-rs/toolchain@v1 - # with: - # profile: minimal - # toolchain: nightly - # components: llvm-tools-preview - # override: true - - # - uses: Swatinem/rust-cache@v1 - - # - uses: Swatinem/fucov@v1 - # with: - # args: --workspace --all-features - - # - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 - # with: - # directory: coverage + codecov: + name: Code Coverage + runs-on: ubuntu-latest + continue-on-error: true # well, its nightly and highly experimental + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + components: llvm-tools-preview + override: true + + - uses: Swatinem/rust-cache@v1 + + - uses: taiki-e/install-action@cargo-llvm-cov + + - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + + - uses: Swatinem/fucov@v1 + with: + args: --workspace --all-features + + - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 + with: + files: lcov.info From 8dae3f8f4b8931faba4f5a112328cb35d05b26cd Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Thu, 6 Jan 2022 17:43:20 +0100 Subject: [PATCH 4/6] well, remove fucov ;-) --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0d884df..171ba71e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,10 +145,6 @@ jobs: - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - - uses: Swatinem/fucov@v1 - with: - args: --workspace --all-features - - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 with: files: lcov.info From 424990321bcca5cd69805b9239c558d59a185e83 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Thu, 6 Jan 2022 17:49:16 +0100 Subject: [PATCH 5/6] also test doctests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 171ba71e..a9bb65bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: - uses: taiki-e/install-action@cargo-llvm-cov - - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - run: cargo llvm-cov --all-features --workspace --doctests --lcov --output-path lcov.info - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 with: From 2d770fc98f5a9da51a0be8823946dd0ec436a519 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Tue, 18 Jan 2022 11:47:58 +0100 Subject: [PATCH 6/6] go back to pinning --- .github/workflows/ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9bb65bd..3fb1883b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,10 @@ jobs: - run: make testfast + # Code coverage instrumentation is current broken in recent Rust nightlies, + # as they fail processing with the following error: + # `Failed to load coverage: Truncated coverage data` + # https://github.com/taiki-e/cargo-llvm-cov/issues/128 codecov: name: Code Coverage runs-on: ubuntu-latest @@ -135,16 +139,23 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: nightly-2022-01-14 components: llvm-tools-preview override: true - uses: Swatinem/rust-cache@v1 - - uses: taiki-e/install-action@cargo-llvm-cov + - uses: Swatinem/fucov@v1 + with: + args: --workspace --all-features + + # Or maybe switch to `cargo-llvm-cov` later once its doctests are fixed + + #- uses: taiki-e/install-action@cargo-llvm-cov - - run: cargo llvm-cov --all-features --workspace --doctests --lcov --output-path lcov.info + #- run: cargo llvm-cov --all-features --workspace --doctests --lcov --output-path lcov.info - uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 with: - files: lcov.info + directory: coverage + #files: lcov.info