Skip to content

Commit 74efa8f

Browse files
committed
codecov
1 parent c6a8a49 commit 74efa8f

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/coverage.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ env:
3131
RUSTC_WRAPPER: sccache
3232
CC: sccache clang
3333
CXX: sccache clang++
34+
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
35+
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
36+
FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT: 1
3437

3538
jobs:
3639
codecov:
@@ -51,13 +54,7 @@ jobs:
5154
- uses: taiki-e/install-action@nextest
5255
- run: cargo run --bin forest-dev --no-default-features --profile quick -- fetch-rpc-tests
5356
- name: Generate code coverage
54-
run: |
55-
cargo llvm-cov --workspace --profile quick --codecov --output-path lcov.info test
56-
env:
57-
CC: "sccache clang"
58-
CXX: "sccache clang++"
59-
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
60-
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
57+
run: make codecov
6158
# Save lcov.info as an artifact for debugging purposes
6259
- uses: actions/upload-artifact@v4
6360
with:

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: install nextest
5353
uses: taiki-e/install-action@nextest
5454
- run: make test
55+
env:
56+
# Skip RPC snapshot tests for debug build
57+
FOREST_RPC_SNAPSHOT_TEST_OPT_OUT: 1
5558
tests-release:
5659
runs-on: ubuntu-24.04-arm
5760
# Run the job only if the PR is not a draft.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ rust2go = { workspace = true, features = ["build"] }
270270
debug = 0
271271
split-debuginfo = "unpacked"
272272

273+
[profile.codecov]
274+
inherits = "dev"
275+
opt-level = 1
276+
lto = "off"
277+
273278
# Profile for interactive debugging sessions, e.g., with LLDB.
274279
# Doesn't work with Go FFI - disable it with `FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT=1`.
275280
[profile.debugging]

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ docker-run:
9999
docker build -t forest:latest -f ./Dockerfile . && docker run forest
100100

101101
test:
102-
# Skip RPC snapshot tests for debug build
103-
export FOREST_RPC_SNAPSHOT_TEST_OPT_OUT=1
104102
cargo nextest run --workspace --no-fail-fast
105103

106104
# nextest doesn't run doctests https://github.com/nextest-rs/nextest/issues/16
@@ -112,6 +110,9 @@ test-release:
112110

113111
test-all: test test-release
114112

113+
codecov:
114+
cargo llvm-cov -p forest-filecoin --ignore-run-fail --no-default-features --profile codecov --codecov --output-path lcov.info
115+
115116
# Checks if all headers are present and adds if not
116117
license:
117118
./scripts/add_license.sh

0 commit comments

Comments
 (0)