forked from consensus-shipyard/ref-fvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust Code Coverage Reporting (filecoin-project#612)
* first stab at CI * dont use cuda for CI, enable debug feature for SDK * merge coverage action with main ci test run * add special case for matrix item * rename uses to tool to avoid keyword conflict * just download llvm-cov for every item in matrix for now * if statement test * fix ci if statements (hopefully) * maybe fix if statement * fix ci if statements for sure this time * use sha hash for ci dep versions, dont import llvm-cov when uneeded * split integration tests into its own job for seperate coverage tooling later, use version number for instead of sha for sub-tool * add right tools to test job * fix coverage report file output names * rename jobs
- Loading branch information
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,18 @@ jobs: | |
args: --all --all-targets | ||
components: clippy | ||
- name: test-fvm | ||
command: test | ||
args: --package fvm --no-default-features | ||
covname: fvm-lcov.info | ||
command: llvm-cov | ||
args: --package fvm --no-default-features --lcov --output-path fvm-lcov.info | ||
components: llvm-tools-preview | ||
- name: test | ||
covname: lcov.info | ||
command: llvm-cov | ||
args: --all --exclude fvm --exclude fvm_conformance_tests --exclude fvm_integration_tests --exclude "*actor" --lcov --output-path lcov.info | ||
components: llvm-tools-preview | ||
- name: integration | ||
command: test | ||
args: --all --exclude fvm --exclude fvm_conformance_tests | ||
args: --package fvm_integration_tests --package "*actor" | ||
- name: conformance | ||
command: test | ||
args: --package fvm_conformance_tests | ||
|
@@ -52,8 +59,9 @@ jobs: | |
env: | ||
SCCACHE_CACHE_SIZE: 2G | ||
SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache | ||
CARGO_INCREMENTAL: 0 | ||
CACHE_SKIP_SAVE: ${{ matrix.push == '' || matrix.push == 'false' }} | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
name: ${{ matrix.name }} | ||
steps: | ||
- name: Checking out fvm | ||
|
@@ -72,6 +80,11 @@ jobs: | |
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 | ||
with: | ||
command: generate-lockfile | ||
- name: Installing Cargo llvm-cov | ||
if: ${{ matrix.covname }} | ||
uses: taiki-e/install-action@bc0a06a003a8225fe3e896c9ed3a4c3cc2e8416a | ||
with: | ||
tool: [email protected] | ||
- name: Setting up cache | ||
uses: ./.github/actions/rust-sccache | ||
env: | ||
|
@@ -85,3 +98,9 @@ jobs: | |
with: | ||
command: ${{ matrix.command }} | ||
args: ${{ matrix.args }} | ||
- name: Upload coverage to Codecov | ||
if: ${{ matrix.covname }} | ||
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 | ||
with: | ||
files: ${{ matrix.covname }} | ||
fail_ci_if_error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ Cargo.lock | |
*.wasm | ||
!testing/integration/tests/assets/* | ||
.idea/ | ||
lcov.info |