chore: Rename CI jobs, run on M1 mac (#6089)

* Try macos-14 for fun

* Decouple OS names and VM names

* Shorten `cross-build-test` to `build`
This commit is contained in:
Francis Lavoie 2024-02-09 17:31:26 -05:00 committed by GitHub
parent a6d9f9be5b
commit c78ebb3d6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 13 deletions

View file

@ -19,9 +19,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: os:
- ubuntu-latest - linux
- macos-latest - mac
- windows-latest - windows
go: go:
- '1.21' - '1.21'
- '1.22' - '1.22'
@ -36,21 +36,25 @@ jobs:
GO_SEMVER: '~1.22.0' GO_SEMVER: '~1.22.0'
# Set some variables per OS, usable via ${{ matrix.VAR }} # Set some variables per OS, usable via ${{ matrix.VAR }}
# OS_LABEL: the VM label from GitHub Actions (see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories)
# CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing # CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing
# SUCCESS: the typical value for $? per OS (Windows/pwsh returns 'True') # SUCCESS: the typical value for $? per OS (Windows/pwsh returns 'True')
- os: ubuntu-latest - os: linux
OS_LABEL: ubuntu-latest
CADDY_BIN_PATH: ./cmd/caddy/caddy CADDY_BIN_PATH: ./cmd/caddy/caddy
SUCCESS: 0 SUCCESS: 0
- os: macos-latest - os: mac
OS_LABEL: macos-14
CADDY_BIN_PATH: ./cmd/caddy/caddy CADDY_BIN_PATH: ./cmd/caddy/caddy
SUCCESS: 0 SUCCESS: 0
- os: windows-latest - os: windows
OS_LABEL: windows-latest
CADDY_BIN_PATH: ./cmd/caddy/caddy.exe CADDY_BIN_PATH: ./cmd/caddy/caddy.exe
SUCCESS: 'True' SUCCESS: 'True'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.OS_LABEL }}
steps: steps:
- name: Checkout code - name: Checkout code
@ -125,7 +129,7 @@ jobs:
# To return the correct result even though we set 'continue-on-error: true' # To return the correct result even though we set 'continue-on-error: true'
# - name: Coerce correct build result # - name: Coerce correct build result
# if: matrix.os != 'windows-latest' && steps.step_test.outputs.status != ${{ matrix.SUCCESS }} # if: matrix.os != 'windows' && steps.step_test.outputs.status != ${{ matrix.SUCCESS }}
# run: | # run: |
# echo "step_test ${{ steps.step_test.outputs.status }}\n" # echo "step_test ${{ steps.step_test.outputs.status }}\n"
# exit 1 # exit 1

View file

@ -11,7 +11,7 @@ on:
- 2.* - 2.*
jobs: jobs:
cross-build-test: build:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View file

@ -23,10 +23,22 @@ jobs:
strategy: strategy:
matrix: matrix:
os: os:
- ubuntu-latest - linux
- macos-latest - mac
- windows-latest - windows
runs-on: ${{ matrix.os }}
include:
- os: linux
OS_LABEL: ubuntu-latest
- os: mac
OS_LABEL: macos-14
- os: windows
OS_LABEL: windows-latest
runs-on: ${{ matrix.OS_LABEL }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5