summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2023-04-14 21:38:33 -0400
committerGitHub <noreply@github.com>2023-04-14 21:38:33 -0400
commit998c6e06a75030cccabcc08790bc32642791aff7 (patch)
tree930e3f074572a8fcfc78b9c2163ee8543cea6080 /.github
parent4636109ce17e6ba5f46e73b7b1f3ae82d076a625 (diff)
chore: Adjustments to CI caching (#5495)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml27
-rw-r--r--.github/workflows/cross-build.yml19
-rw-r--r--.github/workflows/release.yml22
3 files changed, 13 insertions, 55 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e7dc775..6948db0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,15 +48,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true
- - name: Checkout code
- uses: actions/checkout@v3
-
# These tools would be useful if we later decide to reinvestigate
# publishing test/coverage reports to some tool for easier consumption
# - name: Install test and coverage analysis tools
@@ -79,23 +79,6 @@ jobs:
# Calculate the short SHA1 hash of the git commit
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- - name: Cache the build cache
- uses: actions/cache@v3
- with:
- # In order:
- # * Module download cache
- # * Build cache (Linux)
- # * Build cache (Mac)
- # * Build cache (Windows)
- path: |
- ~/go/pkg/mod
- ~/.cache/go-build
- ~/Library/Caches/go-build
- ~\AppData\Local\go-build
- key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-${{ matrix.go }}-go-ci
-
- name: Get dependencies
run: |
go get -v -t -d ./...
@@ -146,7 +129,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
continue-on-error: true # August 2020: s390x VM is down due to weather and power issues
steps:
- - name: Checkout code into the Go module directory
+ - name: Checkout code
uses: actions/checkout@v3
- name: Run Tests
run: |
@@ -172,7 +155,7 @@ jobs:
goreleaser-check:
runs-on: ubuntu-latest
steps:
- - name: checkout
+ - name: Checkout code
uses: actions/checkout@v3
- uses: goreleaser/goreleaser-action@v4
diff --git a/.github/workflows/cross-build.yml b/.github/workflows/cross-build.yml
index a3f9a0d..48e9b18 100644
--- a/.github/workflows/cross-build.yml
+++ b/.github/workflows/cross-build.yml
@@ -27,6 +27,9 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
- name: Install Go
uses: actions/setup-go@v4
with:
@@ -43,22 +46,6 @@ jobs:
printf "\n\nSystem environment:\n\n"
env
- - name: Cache the build cache
- uses: actions/cache@v3
- with:
- # In order:
- # * Module download cache
- # * Build cache (Linux)
- path: |
- ~/go/pkg/mod
- ~/.cache/go-build
- key: cross-build-go${{ matrix.go }}-${{ matrix.goos }}-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- cross-build-go${{ matrix.go }}-${{ matrix.goos }}
-
- - name: Checkout code into the Go module directory
- uses: actions/checkout@v3
-
- name: Run Build
env:
CGO_ENABLED: 0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 16a5dd2..e8c332d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,17 +29,17 @@ jobs:
contents: write
steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true
- - name: Checkout code
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
# Force fetch upstream tags -- because 65 minutes
# tl;dr: actions/checkout@v3 runs this line:
# git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +ebc278ec98bb24f2852b61fde2a9bf2e3d83818b:refs/tags/
@@ -94,18 +94,6 @@ jobs:
# tags are only accepted if signed by Matt's key
git verify-tag "${{ steps.vars.outputs.version_tag }}" || exit 1
- - name: Cache the build cache
- uses: actions/cache@v3
- with:
- # In order:
- # * Module download cache
- # * Build cache (Linux)
- path: |
- ~/go/pkg/mod
- ~/.cache/go-build
- key: ${{ runner.os }}-go${{ matrix.go }}-release-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go${{ matrix.go }}-release
- name: Install Cosign
uses: sigstore/cosign-installer@main
- name: Cosign version