matrix builds for CI. simplifying release config

This commit is contained in:
Shawn Hartsell
2024-04-22 16:20:14 -05:00
parent 17ffd6eca4
commit ed25954c6c
6 changed files with 74 additions and 50 deletions
@@ -8,7 +8,13 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
runson: [ubuntu-latest, macos-latest, windows-latest] runson: [
ubuntu-latest,
ubuntu-20.04,
macos-latest,
windows-latest,
windows-2019
]
uses: ./.github/workflows/actions-sync-e2e-test-called.yml uses: ./.github/workflows/actions-sync-e2e-test-called.yml
with: with:
runson: ${{ matrix.runson }} runson: ${{ matrix.runson }}
+19 -9
View File
@@ -4,13 +4,23 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
CI: CI:
runs-on: ubuntu-latest strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Lint - name: Setup Go
run: docker-compose run --rm lint uses: actions/setup-go@v5
- name: Test with:
run: docker-compose run --rm test go-version: 1.21
- name: E2E - name: Lint
run: docker-compose run --rm test-build uses: golangci/golangci-lint-action@v4
with:
version: v1.57.2
args: run
- name: Unit Tests
run: .script/test
- name: Build and Test
run: ./script/test-build
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
- name: Set CURRENT_TAG - name: Set CURRENT_TAG
run: echo "GORELEASER_CURRENT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV run: echo "GORELEASER_CURRENT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@f09f1a7bee7ae6b5153daf4e8c63cc8ce8c7e7d5 uses: goreleaser/goreleaser-action@v5
with: with:
version: latest version: latest
args: release --clean args: release --clean
+23 -15
View File
@@ -1,16 +1,24 @@
project_name: gh project_name: actions/actions-sync
builds: builds:
- <<: &build_defaults - id: build
binary: bin/actions-sync goos:
id: macos - linux
goos: [darwin] - darwin
goarch: [amd64, arm64] - windows
- <<: *build_defaults goarch:
id: linux - amd64
goos: [linux] - arm64
goarch: [amd64, arm64] binary: bin/actions-sync
- <<: *build_defaults ignore:
id: windows - goos: windows
goos: [windows] goarch: arm64
goarch: [amd64] env:
- CGO_ENABLED=0
release:
github:
owner: actions
name: actions-sync
# Create the release as a draft so it can be tested before being published
# To test, go to the Actions tab and run the "Actions Sync E2E Sanity Test" workflow
draft: true
+23 -23
View File
@@ -1,23 +1,23 @@
version: "3.5" # version: "3.5"
services: # services:
lint: # lint:
image: lint # image: lint
build: # build:
context: . # context: .
dockerfile: Dockerfile.cibuild # dockerfile: Dockerfile.cibuild
entrypoint: # entrypoint:
- script/lint # - script/lint
test: # test:
image: test # image: test
build: # build:
context: . # context: .
dockerfile: Dockerfile.cibuild # dockerfile: Dockerfile.cibuild
entrypoint: # entrypoint:
- script/test # - script/test
test-build: # test-build:
image: test-build # image: test-build
build: # build:
context: . # context: .
dockerfile: Dockerfile.cibuild # dockerfile: Dockerfile.cibuild
entrypoint: # entrypoint:
- script/test-build # - script/test-build
+1 -1
View File
@@ -4,7 +4,7 @@ if($IsLinux) {
} elseif ($IsWindows) { } elseif ($IsWindows) {
$file_postfix = "windows_amd64" $file_postfix = "windows_amd64"
} elseif ($IsMacOS) { } elseif ($IsMacOS) {
$file_postfix = "darwin_amd64" $file_postfix = "darwin_arm64"
} }
# Download release to test # Download release to test