Skip to content

Comments

chore: improve integration test runs in the CI (build once, reuse across matrix)#2932

Open
mojtaba-esk wants to merge 32 commits intomainfrom
mojtaba/use-cache-to-improve-integration-test-in-ci
Open

chore: improve integration test runs in the CI (build once, reuse across matrix)#2932
mojtaba-esk wants to merge 32 commits intomainfrom
mojtaba/use-cache-to-improve-integration-test-in-ci

Conversation

@mojtaba-esk
Copy link
Contributor

@mojtaba-esk mojtaba-esk commented Feb 19, 2026

Describe your changes and provide context

This PR proposes to build the localnode image once in a dedicated job (base from GHCR or build+push, app with GHA cache, then push to ttl.sh with commit-SHA tag). All 14 matrix test jobs pull that image and run the cluster/tests instead of building. Makefile adds build-docker-node-app and drops proxy/local-only logic; Dockerfiles use ubuntu:25.04.

Testing performed to validate your change (CI Performance Improvement Summary)

Comparison Scope

This compares the Baseline CI architecture vs the *Run after improvements applied (Latest run) *.

  • Baseline: Each of the 14 jobs builds its own image.
  • Latest: One shared image build, then 14 jobs run in parallel.
  • Total time is measured as wall-clock duration (critical path).

Wall Clock Time

Run Total Time
Baseline 1h 56m 27s
Latest 1h 05m 50s

Total reduction: 50m 37s (~43.5% faster)


Critical Path (Normalized Comparison)

Since baseline jobs each built their own image, we compare:

  • Baseline bottleneck:
    EVM Interoperability = 14m 17s

  • Latest bottleneck (Build + EVM Interoperability):
    2m 17s + 10m 19s = 12m 36s

Metric Baseline Latest
Critical Path 14m 17s 12m 36s

Net improvement on true per-job cost: 1m 41s (~12% faster)


Resource Usage Impact

Baseline:

  • 14 jobs each built their own image.
  • Build step duplicated 14 times.
  • Significant redundant compute usage.

Latest:

  • Image built once (2m 17s).
  • Eliminates 13 redundant builds.
  • Reduces overall runner CPU time and resource contention.

This reduces total runner-minute consumption while also improving wall-clock time.


Summary

  • CI wall-clock time reduced by ~50 minutes.
  • ~43% faster pipeline execution.
  • Shared image build removes redundant compute work.
  • Critical path is now ~12% faster than baseline.
  • Lower compute waste and more scalable architecture.

While the per-job runtime gain is modest (~1m 41s), the overall CI latency and resource efficiency improvements are substantial.

Note: Timings were collected from the GitHub Actions usage page for this PR only and may vary due to runner load, caching state, and other environmental factors.

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 20, 2026, 4:37 PM

@github-actions
Copy link

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 19, 2026, 10:20 AM

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.52%. Comparing base (d1885eb) to head (d596ca2).

Files with missing lines Patch % Lines
giga/executor/lib/evmlib.go 0.00% 8 Missing ⚠️

❌ Your project check has failed because the head coverage (0.00%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2932       +/-   ##
===========================================
+ Coverage   57.76%   66.52%    +8.75%     
===========================================
  Files        2111        6     -2105     
  Lines      174240      469   -173771     
===========================================
- Hits       100653      312   -100341     
+ Misses      64631      127    -64504     
+ Partials     8956       30     -8926     
Flag Coverage Δ
sei-chain 0.00% <0.00%> (-57.74%) ⬇️
sei-db 68.42% <ø> (ø)

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

Files with missing lines Coverage Δ
giga/executor/lib/evmlib.go 0.00% <0.00%> (-55.56%) ⬇️

... and 2105 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mojtaba-esk mojtaba-esk requested a review from masih February 19, 2026 13:52
@mojtaba-esk mojtaba-esk changed the title chore: add cache to imrpve integration test runs in the CI (build once, reuse across matrix) chore: improve integration test runs in the CI (build once, reuse across matrix) Feb 20, 2026
@mojtaba-esk mojtaba-esk marked this pull request as ready for review February 20, 2026 16:36
Comment on lines +8 to +9
RUN curl -L https://go.dev/dl/go1.25.6.linux-amd64.tar.gz | tar xvzf - -C /usr/local/
RUN curl -L https://foundry.paradigm.xyz | bash

Choose a reason for hiding this comment

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

nit: may be worthwhile to pin this to a specific release. As is, this will take whatever that request returns, which could vary from run to run. Can also validate the checksum for integrity. Reproducibility in practice being the more concerning point to me.

DOCKER_BUILD_CACHE_TO ?=
LOCALNODE_BASE_TAG := sei-chain/localnode-base:go1.25.6

# Base image (Go, Foundry, Node). Rebuild only when tool versions or Dockerfile.base change.

Choose a reason for hiding this comment

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

Just a matter of preference: this seems a little misleading on first read. I initially interpreted this as the target enforcing this diff check.

fi
.PHONY: build-docker-node-base

# Build only the app image (requires sei-chain/localnode-base:go1.25.6 to exist locally; used in CI when base is pulled or pre-built)

Choose a reason for hiding this comment

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

Instead of commenting this dependency, consider codifying it and making the build of the localnode-base a prerequisite or adding a log to make the outcome clear.

Comment on lines +259 to +261
@if [ ! -f build/seid ] || [ ! -f build/price-feeder ]; then \
echo "ERROR: build/seid and build/price-feeder must exist. Run the build step first."; exit 1; \
fi

Choose a reason for hiding this comment

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

Nice!

.PHONY: build-docker-node-app

# Build app image with prebuilt seid binary (context = repo root; requires build/seid and build/price-feeder to exist).
# Used in CI: build seid in a container first, then run this target so the image contains the binary.

Choose a reason for hiding this comment

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

nit: we're building seid in the runner I believe.

Comment on lines +276 to +277
# Build docker image for detected platform (depends on base; app layer is quick)
build-docker-node: build-docker-node-base

Choose a reason for hiding this comment

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

This is better since you're explicitly orchestrating dependencies rather than them being in a comment most people (or agents) won't immediately see.

Also, not immediately clear why you'd use a sub-make target for build-docker-node-app. If you do: build-docker-node: build-docker-node-base build-docker-node-app then Makefile analysis tools will be able to better understand make target relationships.

Let me know if I've missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants