nervosnetwork / nervosnetwork/ckb

Enhance CI Workflow Efficiency

Open
#4,567 2 comments 0 reactions 0 assignees View on GitHub
stale t:enhancement
Dominant language
Rust
Stars
1.2k
Forks
266
Avg merge
10d 5h
Merged PRs (30d)
4

Description

## Feature Request

#### Is your feature request related to a problem? Please describe.

Our CI workflows are currently slow, and we'd like to propose a few improvements:

1. **Push Events:**
- Run only lint, unit, and integration tests on Ubuntu to speed up feedback.

2. **Merge Group:**
- Run the full suite (macOS, Windows, Ubuntu) for comprehensive checks.

3. **Optimize Build Time:**
- Make `ckb-test` as a [bin] in the `ckb` workspace, let `ckb-test bin` and `ckb bin` shared same one `target` dir.
- Build once in `make prod` so that `make integration` reuses the artifacts, reducing overall time.

4. **Unify Dependency Versions:**
- Use `cargo tree --duplicate` to ensure each dependency version is used only once, reducing compilation redundancies.

5. **Cache Build Target**
- Use rust-sccache on CI https://github.com/marketplace/actions/rust-sccache
6. **Increase Integration Test Concurrency**
- https://github.com/eval-exec/ckb/blob/exec%2Ffix-ci/Makefile#L8 (`-c 4` means that only 4 integration tests are allowed to run simultaneously, need to increase)

These changes will streamline our CI processes and reduce build times.

#### Describe the solution you'd like

#### Describe alternatives you've considered

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the CI workflow definitions and the Makefile entries for `make prod` and `make integration`. Check the `ckb` workspace layout, `cargo tree --duplicate`, the linked integration-test command, and the proposed push versus merge-group behavior. Done means the requested CI paths, shared build artifacts, dependency versions, caching, and test concurrency are improved without losing the full merge-group checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.