File tree Expand file tree Collapse file tree 6 files changed +27
-13
lines changed
Expand file tree Collapse file tree 6 files changed +27
-13
lines changed Original file line number Diff line number Diff line change 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"
3436
3537jobs :
3638 codecov :
5052 - uses : taiki-e/install-action@cargo-llvm-cov
5153 - uses : taiki-e/install-action@nextest
5254 - name : Generate code coverage
53- run : |
54- cargo llvm-cov --workspace --codecov --output-path lcov.info nextest
55- env :
56- CC : " sccache clang"
57- CXX : " sccache clang++"
58- # To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
59- RUSTFLAGS : " -C linker=clang -C link-arg=-fuse-ld=lld"
55+ run : make codecov
6056 # Save lcov.info as an artifact for debugging purposes
6157 - uses : actions/upload-artifact@v6
6258 with :
Original file line number Diff line number Diff line change @@ -268,9 +268,11 @@ rust2go = { workspace = true, features = ["build"] }
268268debug = " line-tables-only"
269269split-debuginfo = " unpacked"
270270
271- # Avoid generating any debug information for dependencies
272271[profile .dev .package ."*" ]
272+ # Avoid generating any debug information for dependencies
273273debug = false
274+ # Speed up debug tests and codecov tests
275+ opt-level = 1
274276
275277# Profile for interactive debugging sessions, e.g., with LLDB.
276278# Doesn't work with Go FFI - disable it with `FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT=1`.
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ test-release:
110110
111111test-all : test test-release
112112
113+ codecov :
114+ cargo llvm-cov --workspace --codecov --output-path lcov.info --ignore-run-fail
115+
113116# Checks if all headers are present and adds if not
114117license :
115118 ./scripts/add_license.sh
Original file line number Diff line number Diff line change @@ -41,3 +41,19 @@ tokio = { workspace = true, features = ['full'] }
4141
4242[build-dependencies ]
4343rust2go = { workspace = true , features = [" build" ] }
44+
45+ # https://doc.rust-lang.org/stable/cargo/guide/build-performance.html#reduce-amount-of-generated-debug-information
46+ [profile .dev ]
47+ debug = " line-tables-only"
48+ split-debuginfo = " unpacked"
49+
50+ [profile .dev .package ."*" ]
51+ # Avoid generating any debug information for dependencies
52+ debug = false
53+ # Speed up debug tests and codecov tests
54+ opt-level = 1
55+
56+ [profile .dev .package ."forest-filecoin" ]
57+ debug = " line-tables-only"
58+ split-debuginfo = " unpacked"
59+ opt-level = 0
Original file line number Diff line number Diff line change @@ -199,11 +199,6 @@ mod tests {
199199 include ! ( concat!( env!( "OUT_DIR" ) , "/__rpc_regression_tests_gen.rs" ) ) ;
200200
201201 async fn rpc_regression_test_run ( name : & str ) {
202- // Skip for debug build on CI as the downloading is slow and flaky
203- if crate :: utils:: is_ci ( ) && crate :: utils:: is_debug_build ( ) {
204- return ;
205- }
206-
207202 // Set proof parameter data dir and make sure the proofs are available
208203 {
209204 static PROOF_PARAMS_LOCK : LazyLock < Mutex < ( ) > > = LazyLock :: new ( || Mutex :: new ( ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -169,11 +169,13 @@ pub enum RetryError {
169169 RetriesExceeded ,
170170}
171171
172+ #[ allow( dead_code) ]
172173#[ cfg( test) ]
173174pub fn is_debug_build ( ) -> bool {
174175 cfg ! ( debug_assertions)
175176}
176177
178+ #[ allow( dead_code) ]
177179#[ cfg( test) ]
178180pub fn is_ci ( ) -> bool {
179181 // https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
You can’t perform that action at this time.
0 commit comments