Skip to content

CI: optimize caches used by CircleCI and GHA#4461

Merged
cce merged 4 commits into
algorand:masterfrom
cce:reuse-go-cache
Sep 2, 2022
Merged

CI: optimize caches used by CircleCI and GHA#4461
cce merged 4 commits into
algorand:masterfrom
cce:reuse-go-cache

Conversation

@cce
Copy link
Copy Markdown
Contributor

@cce cce commented Aug 24, 2022

Summary

This updates the CircleCI and Github Actions caches to make it possible to find cache hits more often, by tweaking the key scheme for Go mod source and build caches.

For Github Actions, adding CI for merges to master, will ensure we are doing the same testing as on PRs, and also provide cached data on master that ensures the GHA cache will serve a hit from the master build for the first commit on a new branch PR.

A workflow can access and restore a cache created in the current branch, the base branch (including base branches of forked repositories), or the default branch (usually main). For example, a cache created on the default branch would be accessible from any pull request.
https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache

Test Plan

Rerun this PR after changing some code.

@cce cce added the Bug-Fix label Aug 24, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 24, 2022

Codecov Report

Merging #4461 (9e87a11) into master (3a2bcf4) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4461      +/-   ##
==========================================
+ Coverage   55.25%   55.26%   +0.01%     
==========================================
  Files         398      398              
  Lines       50265    50265              
==========================================
+ Hits        27772    27781       +9     
+ Misses      20174    20169       -5     
+ Partials     2319     2315       -4     
Impacted Files Coverage Δ
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
ledger/acctupdates.go 69.29% <0.00%> (-0.60%) ⬇️
catchup/service.go 69.38% <0.00%> (ø)
ledger/acctonline.go 78.36% <0.00%> (+0.52%) ⬆️
network/wsPeer.go 67.94% <0.00%> (+0.54%) ⬆️
data/transactions/verify/txn.go 44.64% <0.00%> (+0.89%) ⬆️
util/db/dbutil.go 48.48% <0.00%> (+4.24%) ⬆️
ledger/voters.go 73.13% <0.00%> (+4.47%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cce cce closed this Aug 24, 2022
@cce cce deleted the reuse-go-cache branch August 24, 2022 23:35
@cce cce restored the reuse-go-cache branch August 24, 2022 23:36
@cce cce reopened this Aug 24, 2022
@cce cce changed the title CI: save Go build/test cache after tests complete CI: optimize caches used by CircleCI and GHA Aug 25, 2022
@cce cce marked this pull request as ready for review August 25, 2022 01:57
@cce cce added Enhancement and removed Bug-Fix labels Aug 25, 2022
@cce cce requested review from a team, algobarb, algojack and algolucky August 26, 2022 15:35
Copy link
Copy Markdown
Contributor

@algolucky algolucky left a comment

Choose a reason for hiding this comment

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

+1 for moving the caching into their own jobs.

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