Skip to content

<CI>(check): run each integration round as a parallel matrix job#962

Merged
kyonRay merged 4 commits into
FISCO-BCOS:release-3.9.0from
kyonRay:ci/parallel-round-jobs
Jul 16, 2026
Merged

<CI>(check): run each integration round as a parallel matrix job#962
kyonRay merged 4 commits into
FISCO-BCOS:release-3.9.0from
kyonRay:ci/parallel-round-jobs

Conversation

@kyonRay

@kyonRay kyonRay commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

Run each integration-test round as its own parallel CI job instead of three sequential rounds on one runner.

  • .ci/ci_check.sh now takes a round idpinned-ecdsa | latest-ecdsa | latest-sm. Each id builds just that round's single 4-node cert-free chain and runs one integrationTest pass against it. Running with no argument (or all) keeps the old sequential "build all three chains, run all three rounds" path for local use.
  • .github/workflows/workflow.yml: the old build job is split into
    • a Windows-only build job (./gradlew.bat build — compile + unit tests, unchanged), and
    • a new integration matrix 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) and coverage are unchanged. Branch-protection required-check settings will need updating to the new names.

Test plan

  • bash -n .ci/ci_check.sh and YAML parse both clean
  • Round dispatch verified with stubbed download/build functions: each round id maps to the correct version / ports / sm flag / outdir; all runs all three; a bad id prints usage and exits 2
  • CI green on this PR (the real validation — confirms the parallel rounds pass and are faster)

Copilot AI and others added 3 commits July 16, 2026 17:09
* 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.
Copilot AI review requested due to automatic review settings July 16, 2026 09:36
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.10%. Comparing base (ab0390c) to head (c887d5f).
⚠️ Report is 3 commits behind head on release-3.9.0.

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     
Flag Coverage Δ
unittest 64.10% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 build job and a Linux/macOS integration matrix job over {pinned-ecdsa, latest-ecdsa, latest-sm}.
  • Update .ci/ci_check.sh to accept a round id and execute only that round (with all/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.

Comment thread .ci/ci_check.sh
Comment on lines +251 to +270
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.
@kyonRay
kyonRay merged commit b07af08 into FISCO-BCOS:release-3.9.0 Jul 16, 2026
7 of 8 checks passed
@kyonRay
kyonRay deleted the ci/parallel-round-jobs branch July 16, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants