From c04a550a1880b37f6d43f4f7c618b4548dbb46bf Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sun, 24 Aug 2025 00:27:48 +0800 Subject: [PATCH] ci: cache the Go build cache for cross-compilation workflow (#5297) * ci: cache the Go build cache for cross-compilation workflow * only store cache when on master * don't hash go.sum in --- .github/workflows/cross-compile.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/cross-compile.yml b/.github/workflows/cross-compile.yml index 97e6f56e3..1669d6b07 100644 --- a/.github/workflows/cross-compile.yml +++ b/.github/workflows/cross-compile.yml @@ -13,6 +13,15 @@ jobs: - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} + - name: Load Go cache + id: load-go-cache + uses: actions/cache@v4 + with: + path: ~/.cache/go-build + key: go-${{ matrix.go }}-crosscompile + restore-keys: go-${{ matrix.go }}-crosscompile + # only store cache when on master + lookup-only: ${{ github.event_name != 'push' || github.ref_name != 'master' }} - name: Install build utils run: | sudo apt-get update