Skip to content

CI: some improvements for faster PR builds#6397

Merged
cce merged 37 commits intoalgorand:masterfrom
cce:faster-ci
Aug 5, 2025
Merged

CI: some improvements for faster PR builds#6397
cce merged 37 commits intoalgorand:masterfrom
cce:faster-ci

Conversation

@cce
Copy link
Copy Markdown
Contributor

@cce cce commented Jul 30, 2025

Summary

  • Don't use verbose logging in test output (effectively reverts testing: Set gotestsum format to standard-verbose #3634) so easier to see failures
  • Consolidate Go setup with version detection & module caching to a single reusable action
  • Don't use the travis-ci gimme tool to download Go environment (just rely on setup-go action)
  • Remove initial build job and workspace archiving + downloading by downstream jobs
    • Remove ~600MB workspace archive (took a few minutes on each end to upload and download)
    • Start the downstream jobs right away without waiting for build
  • Don't call apt update & install if we already have sqlite3 installed (saves ~1 minute) and don't need expect
  • Skip apt trigger for man-db rebuild (saves 1-2 minutes) using fix from Disable man-db dpkg trigger actions/runner-images#10977
  • Consistent libsodium caching across jobs/workflows
  • Remove legacy GOCACHE NFS workaround from Eric/use mule in jenkins #1072 (no longer necessary in current Go versions)
  • Add build-e2e Makefile target for E2E tests to build only the binaries they need (with race detection except kmd).
    • integration and e2e_expect use race detection binaries, but e2e_subs hasn't been using them (and still doesn't, when I tried it there were timeouts, probably due to crypto getting slower with race detection)
  • Set NO_BUILD to skip unnecessary extra binary installation by local_install.sh
  • Split e2e_subs job into two shards (and verify the shards ran)
  • Add reusable Slack action to make ci-pr.yml shorter
  • Add report job that puts failed tests into check summary
  • Add custom branch- and job-aware Go mod and build caching

Test Plan

PR tests finish about 2x faster now without build cache, >2x when build cache sharing is effective.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.33%. Comparing base (03d24da) to head (9bcffcf).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (03d24da) and HEAD (9bcffcf). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (03d24da) HEAD (9bcffcf)
4 3
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6397      +/-   ##
==========================================
- Coverage   50.69%   44.33%   -6.37%     
==========================================
  Files         661      654       -7     
  Lines      110771   110683      -88     
==========================================
- Hits        56152    49067    -7085     
- Misses      51751    58549    +6798     
- Partials     2868     3067     +199     

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

jannotti
jannotti previously approved these changes Jul 30, 2025
@cce cce force-pushed the faster-ci branch 5 times, most recently from e313068 to bc3f11a Compare July 31, 2025 01:53
@cce cce force-pushed the faster-ci branch 11 times, most recently from 84a13d0 to 4d99199 Compare July 31, 2025 04:41
jannotti
jannotti previously approved these changes Aug 4, 2025
onetechnical
onetechnical previously approved these changes Aug 4, 2025
onetechnical
onetechnical previously approved these changes Aug 4, 2025
@cce cce requested review from Copilot and jannotti August 4, 2025 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 implements multiple CI/CD improvements to significantly reduce PR build times by consolidating Go setup, eliminating workspace archiving, optimizing dependencies, and improving test parallelization.

  • Removes the build job and workspace archiving/downloading (saves ~600MB transfers per job)
  • Consolidates Go setup with version detection and module caching into reusable actions
  • Adds new build-e2e Makefile target for optimized E2E test binary building
  • Splits e2e_subs job into two shards and adds comprehensive test result reporting

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/ci-pr.yml Major restructuring removing build job, adding test sharding, using reusable actions
.github/workflows/ci-nightly.yml Updates to use new reusable actions and consolidated Go setup
.github/actions/setup-go/action.yml New reusable action for Go setup with advanced caching
.github/actions/setup-test/action.yml New reusable action for test environment setup
.github/actions/slack-notify/action.yml New reusable action for Slack notifications
Makefile Adds build-e2e target, removes GOCACHE workaround, adds libsodium target
test/scripts/e2e.sh Adds support for test suite sharding via E2E_SUBS_TESTSUITE
test/scripts/e2e_go_tests.sh Updates to use new build-e2e target with NO_BUILD support
test/scripts/e2e_client_runner.py Renames output file from results.json to testresults.json
scripts/travis/before_build.sh Simplifies libsodium building using new Makefile target
scripts/travis/codegen_verification.sh Removes gimme tool usage, uses standard make build
AGENTS.md Updates filename and description for broader agent compatibility

Comment thread .github/workflows/ci-pr.yml Outdated
Comment thread test/scripts/e2e.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cce cce merged commit e11f501 into algorand:master Aug 5, 2025
39 checks passed
@cce cce deleted the faster-ci branch August 5, 2025 19:48
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.

6 participants