Improve build-test-deploy GitHub Actions performance (#941)

* github build-test-deploy workflow: split goreleaser-test into 3 actions,
one for each ID/component (sharing a single config file)

rationale: speeding up github actions, goreleaser-test was taking
12-14mins and is the outlier longest to execute right now on this repo

* Revert "gitlab build-test-deploy workflow: split goreleaser-test into 3 actions,"

This reverts commit 61083dbbb8.

* github build-test-deploy workflow: split into 6 actions, divided by
GOARCH/GOOS

rationale: improve performance of checks on PR's

* .goreleaser.yaml - add a breadcrumb to ensure we keep the action jobs
list aligned
This commit is contained in:
Nathan Sullivan
2023-01-03 23:07:10 +10:00
committed by GitHub
parent 0f2892c316
commit 94dd7a670c
2 changed files with 122 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ jobs:
name: collect
path: bin/collect
goreleaser-test:
goreleaser-test-darwin-amd64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
@@ -210,7 +210,125 @@ jobs:
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: amd64
GOOS: darwin
goreleaser-test-linux-amd64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: amd64
GOOS: linux
goreleaser-test-windows-amd64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: amd64
GOOS: windows
goreleaser-test-darwin-arm64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: arm64
GOOS: darwin
goreleaser-test-linux-arm64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: arm64
GOOS: linux
goreleaser-test-windows-arm64:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: "v0.183.0"
args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target
env:
GOARCH: arm64
GOOS: windows
goreleaser:
runs-on: ubuntu-latest