Skip to content

Commit 560fd03

Browse files
authored
ci: cache race-enabled Go build artifacts (#5137)
1 parent 11e9240 commit 560fd03

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
go-checker race cache namespace v1

‎.github/workflows/ci-pr.yaml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ jobs:
4040
path: go/src/github.com/harmony-one/harmony
4141
persist-credentials: false
4242

43-
- &setup-go
44-
name: Set up Go
43+
- name: Set up Go
4544
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 #v6.5.0
4645
with:
4746
go-version: '1.24.2'
@@ -70,7 +69,16 @@ jobs:
7069
strategy: *arch-matrix
7170
steps:
7271
- *checkout-harmony
73-
- *setup-go
72+
- name: Set up Go with race cache
73+
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 #v6.5.0
74+
with:
75+
go-version: '1.24.2'
76+
# Keep race-enabled build artifacts separate from the regular build cache.
77+
# actions/setup-go already separates cache keys by runner architecture.
78+
# Bump the marker file when the race cache strategy changes.
79+
cache-dependency-path: |
80+
go/src/github.com/harmony-one/harmony/go.sum
81+
go/src/github.com/harmony-one/harmony/.github/cache-keys/go-checker-race-v1
7482
- name: Install tools
7583
run: |
7684
go install golang.org/x/tools/cmd/goimports@v0.30.0

0 commit comments

Comments
 (0)