<CI>(check): run each integration round as a parallel matrix job#962
Conversation
* Initial plan * Initial setup: Upgrade Gradle to 7.6.4 for Java 17 compatibility and fix duplicate resources handling Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for model classes and exceptions to improve coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add more unit tests for model and enum classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add unit tests for crypto exception classes to increase coverage Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Downgrade Gradle version to 6.3 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
…codec classes (#4) * Initial plan * Add comprehensive tests for ByteUtils, ThreadPoolService, SystemInformation, SecureRandomUtils, and LinuxSecureRandom Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Add comprehensive tests for JsonRpcRequest and TopicTools Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> * Address code review feedback - fix resource cleanup and remove redundant tests Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
Parameterize ci_check.sh with a round id (pinned-ecdsa | latest-ecdsa |
latest-sm); each id builds just that round's single 4-node cert-free chain
and runs one integrationTest pass. No-arg/all keeps the sequential
all-three-chains path for local runs.
workflow.yml: split the old build job into a Windows-only build job plus an
integration matrix {ubuntu,macos} x {3 rounds}, so the three chains run on
independent runners (one 4-node chain each) instead of one runner carrying
twelve nodes through three sequential rounds. Same tests, same serial
per-round execution; wall-clock per platform drops from ~22min to ~9-10min.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-3.9.0 #962 +/- ##
===================================================
+ Coverage 64.05% 64.10% +0.04%
- Complexity 4567 4570 +3
===================================================
Files 430 430
Lines 17628 17644 +16
Branches 1969 1970 +1
===================================================
+ Hits 11292 11311 +19
+ Misses 5576 5574 -2
+ Partials 760 759 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR restructures the CI pipeline to run each FISCO BCOS integration-test “round” as its own parallel GitHub Actions matrix job, reducing wall-clock CI time and improving runner isolation, while retaining a local “all rounds sequentially” fallback path via .ci/ci_check.sh.
Changes:
- Split GitHub Actions into a Windows-only
buildjob and a Linux/macOSintegrationmatrix job over{pinned-ecdsa, latest-ecdsa, latest-sm}. - Update
.ci/ci_check.shto accept a round id and execute only that round (withall/no-arg preserving sequential execution). - Refresh AGENTS.md documentation to match the new CI execution model and round ids.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
AGENTS.md |
Updates integration-test documentation to reflect per-round invocation and the new CI matrix behavior. |
.github/workflows/workflow.yml |
Splits the old multi-OS build job into Windows build + Linux/macOS integration matrix jobs. |
.ci/ci_check.sh |
Adds round selection/dispatch logic and per-round chain build+test execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| build_and_run_round() | ||
| { | ||
| local round="${1}" | ||
| local tag outdir ports rpc_port sm extra name | ||
| case "${round}" in | ||
| pinned-ecdsa) tag="${PINNED_VERSION}"; outdir="nodes_pinned"; ports="30300,20200"; rpc_port=20200; sm="false"; extra=""; ;; | ||
| latest-ecdsa) tag="$(get_latest_version)"; outdir="nodes_latest"; ports="30310,20210"; rpc_port=20210; sm="false"; extra=""; ;; | ||
| latest-sm) tag="$(get_latest_version)"; outdir="nodes_latest_sm"; ports="30320,20220"; rpc_port=20220; sm="true"; extra="-s"; ;; | ||
| *) echo "unknown round '${round}' (want: pinned-ecdsa | latest-ecdsa | latest-sm)"; exit 2 ;; | ||
| esac | ||
| if ! echo "${tag}" | grep -qE "^v[0-9]+\.[0-9]+\.[0-9]+$"; then | ||
| echo "failed to resolve node version for round '${round}', got: '${tag}'" | ||
| exit 1 | ||
| fi | ||
| if [ "${sm}" = "true" ]; then name="sm @ ${tag}"; else name="ecdsa @ ${tag}"; fi | ||
| download_build_chain "${tag}" | ||
| download_binary "${tag}" | ||
| build_chain_one "${tag}" "${outdir}" "${ports}" "${extra}" | ||
| run_integration_round "${name}" "${rpc_port}" "${sm}" "${outdir}" | ||
| } |
macOS GitHub-hosted runner slots are a scarce org-wide resource (cap ~5, shared across the whole org), so three parallel macOS legs just queue and buy no wall-clock. Make the integration matrix asymmetric: ubuntu runs all three rounds in parallel, macOS runs only the latest-ecdsa smoke round.
What
Run each integration-test round as its own parallel CI job instead of three sequential rounds on one runner.
.ci/ci_check.shnow takes a round id —pinned-ecdsa|latest-ecdsa|latest-sm. Each id builds just that round's single 4-node cert-free chain and runs oneintegrationTestpass against it. Running with no argument (orall) keeps the old sequential "build all three chains, run all three rounds" path for local use..github/workflows/workflow.yml: the oldbuildjob is split intobuildjob (./gradlew.bat build— compile + unit tests, unchanged), andintegrationmatrix job{ubuntu-latest, macos-latest} × {pinned-ecdsa, latest-ecdsa, latest-sm}→.ci/ci_check.sh <round>.Why
Each round takes ~7 min; three sequential rounds + chain setup made the integration job ~22 min (ubuntu) / ~27 min (macOS) per platform. The rounds are independent, so running them as separate matrix legs collapses wall-clock to roughly one round (~9–10 min).
It also improves isolation: each job now builds only its own 4-node chain, instead of one runner carrying all twelve nodes (the 12-node load is what stalled the macOS/Rosetta runner in earlier iterations and forced the "stop chain after each round" workaround).
No change to test content or coverage — the same 333 integration tests run, still serially within each round, against the same node versions.
Heads-up: required status-check names change
Splitting the matrix renames the CI checks. Old:
build (ubuntu-latest),build (macos-latest). New:integration (ubuntu-latest, pinned-ecdsa),integration (ubuntu-latest, latest-ecdsa),integration (ubuntu-latest, latest-sm), and the three macOS equivalents.build (windows-2025)andcoverageare unchanged. Branch-protection required-check settings will need updating to the new names.Test plan
bash -n .ci/ci_check.shand YAML parse both cleanallruns all three; a bad id prints usage and exits 2