Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ env:
RUSTC_WRAPPER: sccache
CC: sccache clang
CXX: sccache clang++
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"

jobs:
codecov:
Expand All @@ -50,13 +52,7 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate code coverage
run: |
cargo llvm-cov --workspace --codecov --output-path lcov.info nextest
env:
CC: "sccache clang"
CXX: "sccache clang++"
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make codecov
# Save lcov.info as an artifact for debugging purposes
- uses: actions/upload-artifact@v6
with:
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ rust2go = { workspace = true, features = ["build"] }
debug = "line-tables-only"
split-debuginfo = "unpacked"

# Avoid generating any debug information for dependencies
[profile.dev.package."*"]
# Avoid generating any debug information for dependencies
debug = false
# Speed up debug tests and codecov tests
opt-level = 1

# Profile for interactive debugging sessions, e.g., with LLDB.
# Doesn't work with Go FFI - disable it with `FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT=1`.
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ test-release:

test-all: test test-release

codecov:
cargo llvm-cov --workspace --codecov --output-path lcov.info --ignore-run-fail

# Checks if all headers are present and adds if not
license:
./scripts/add_license.sh
Expand Down
16 changes: 16 additions & 0 deletions interop-tests/Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,19 @@ tokio = { workspace = true, features = ['full'] }

[build-dependencies]
rust2go = { workspace = true, features = ["build"] }

# https://doc.rust-lang.org/stable/cargo/guide/build-performance.html#reduce-amount-of-generated-debug-information
[profile.dev]
debug = "line-tables-only"
split-debuginfo = "unpacked"

[profile.dev.package."*"]
# Avoid generating any debug information for dependencies
debug = false
# Speed up debug tests and codecov tests
opt-level = 1

[profile.dev.package."forest-filecoin"]
debug = "line-tables-only"
split-debuginfo = "unpacked"
opt-level = 0
5 changes: 0 additions & 5 deletions src/tool/subcommands/api_cmd/test_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ mod tests {
include!(concat!(env!("OUT_DIR"), "/__rpc_regression_tests_gen.rs"));

async fn rpc_regression_test_run(name: &str) {
// Skip for debug build on CI as the downloading is slow and flaky
if crate::utils::is_ci() && crate::utils::is_debug_build() {
return;
}

// Set proof parameter data dir and make sure the proofs are available
{
static PROOF_PARAMS_LOCK: LazyLock<Mutex<()>> = LazyLock::new(|| Mutex::new(()));
Expand Down
2 changes: 2 additions & 0 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ pub enum RetryError {
RetriesExceeded,
}

#[allow(dead_code)]
#[cfg(test)]
pub fn is_debug_build() -> bool {
cfg!(debug_assertions)
}

#[allow(dead_code)]
#[cfg(test)]
pub fn is_ci() -> bool {
// https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
Expand Down
Loading