chore(ci): cache Go modules and build artifacts in CI workflows#5262
Open
geyslan wants to merge 1 commit intoaquasecurity:mainfrom
Open
chore(ci): cache Go modules and build artifacts in CI workflows#5262geyslan wants to merge 1 commit intoaquasecurity:mainfrom
geyslan wants to merge 1 commit intoaquasecurity:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to speed up Tracee’s Go-heavy CI workloads by introducing GitHub Actions caching for the Go module download cache and Go build cache across PR and daily workflows.
Changes:
- Add
actions/cache@v5.0.3steps to cache Go module and build caches in Alpine-container CI jobs. - Add caching for GOPATH/GOCACHE locations in GRAAS AMI-based integration/E2E jobs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
.github/workflows/test-daily.yaml |
Adds caching of ~/go/pkg/mod and ~/.cache/go-build for the scheduled libbpfgo daily compile job. |
.github/workflows/pr.yaml |
Adds caching across multiple PR workflow jobs (lint/build/unit/integration/perf/e2e) for Go modules and build artifacts. |
96def08 to
7627c8f
Compare
Member
Author
|
Pinging for reviewing. 😬 |
Member
Author
|
/fast-forward |
7627c8f to
96840eb
Compare
There was a problem hiding this comment.
Pull request overview
This PR speeds up Tracee’s Go-heavy GitHub Actions workloads by introducing caching for the Go module download cache and Go build cache across CI workflows.
Changes:
- Add
actions/cache@v5.0.3steps to cache Go module and build artifacts. - Apply caching to both Alpine container-based jobs and GRAAS AMI-based jobs, using OS/arch +
go.sumhash keys.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/test-daily.yaml | Adds caching for Go module/build caches in the daily libbpfgo compilation job. |
| .github/workflows/pr.yaml | Adds caching for Go module/build caches across multiple PR CI jobs (Alpine containers + GRAAS AMIs). |
96840eb to
2a92461
Compare
Cache ~/go/pkg/mod and the Go build cache across PR and daily test workflows using actions/cache@v5.0.3. Keys include go.mod hash so caches are busted on Go toolchain upgrades, and an environment discriminator (alpine vs graas) to prevent Alpine container jobs and GRAAS AMI jobs from overwriting each other's entries. Also install the zstd package in Alpine deps, which actions/cache relies on for archive compression on Linux.
2a92461 to
f537cbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Explain what the PR does
f537cbc chore(ci): add Go module and build caching to CI workflows
--
2. Explain how to test it
3. Other comments
~28min https://github.com/aquasecurity/tracee/actions/runs/23299826132/attempts/1?pr=5262
~21min https://github.com/aquasecurity/tracee/actions/runs/23299826132/attempts/2?pr=5262