Skip to content

Commit

Permalink
ci: build using also Go 1.18, Go 1.20, and Go 1.21
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
  • Loading branch information
leodido committed Feb 12, 2024
1 parent 9459ada commit 81de8fb
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,44 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
go: [
'1.18',
'1.19',
'1.20',
'1.21',
]
include:
# Set the minimum Go patch version for the given Go minor
- go: '1.18'
GO_VERSION: '~1.18.0'
- go: '1.19'
GO_VERSION: '~1.19.0'
- go: '1.20'
GO_VERSION: '~1.20.0'
- go: '1.21'
GO_VERSION: '~1.21.0'
runs-on: ${{ matrix.os }}

steps:

- name: Set up Go 1.19
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: ${{ matrix.GO_VERSION }}
check-latest: true

- name: Print environment
id: vars
run: |
printf "Using Go at $(which go) (version $(go version))\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
- name: Check out the source code
uses: actions/checkout@v3
Expand All @@ -23,9 +54,9 @@ jobs:
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('go.mod') }}
key: go-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('go.mod') }}
restore-keys: |
go-${{ runner.os }}-
go-${{ runner.os }}-${{ matrix.go }}
- name: Install Ragel 6.10
run: sudo apt-get install -y ragel
Expand Down

0 comments on commit 81de8fb

Please sign in to comment.