Skip to content

CI: some improvements for faster PR builds #6397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

Conversation

cce
Copy link
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.

Copy link

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
@cce cce changed the title CI: some improvements to build actions CI: some improvements for faster PR builds Aug 1, 2025
Copy link
Contributor

@Copilot 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 comprehensive CI optimizations to reduce PR build times by approximately 2x through eliminating the initial build job, removing workspace archiving/downloading, consolidating Go setup, and improving caching strategies.

Key changes include:

  • Remove the separate build job and ~600MB workspace transfer overhead
  • Consolidate Go setup and caching into reusable actions
  • Split e2e_subs tests into parallel shards and add new build targets
  • Implement consistent libsodium caching and remove legacy workarounds

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/ci-pr.yml Major restructuring - removes build job, adds reusable actions, splits test shards
.github/actions/setup-go/action.yml New reusable action for Go setup with multi-module 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 and libsodium target, removes legacy GOCACHE workaround
test/scripts/e2e.sh Adds support for test suite sharding via E2E_SUBS_TESTSUITE environment variable
test/scripts/e2e_go_tests.sh Adds conditional build logic with NO_BUILD environment variable
Various workflow files Updates to use new reusable actions and consistent caching

jannotti
jannotti previously approved these changes Aug 1, 2025
onetechnical
onetechnical previously approved these changes Aug 2, 2025
Copy link
Contributor

@onetechnical onetechnical left a comment

Choose a reason for hiding this comment

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

If you're pedantic, there's a couple make crypto/libs/linux/amd64/lib/libsodium.a commands in .github/workflows/reviewdog.yml and one in .github/workflow/tools.yml but otherwise I think this PR is good.

@cce cce dismissed stale reviews from onetechnical and jannotti via a0e700a August 2, 2025 01:06
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.

3 participants