Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
* Build with a few different versions of Go.
* Fix "go" executable not being found.
* Update actions/checkout to v4.
  • Loading branch information
SteffenL committed Aug 31, 2024
1 parent 56f456c commit 2d66b36
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,39 @@ on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.image }}
# Go 1.23 was the latest version as of 2024-08-31.
# Go 1.14 made -mod=vendor default.
# Go 1.13 is the version set in go.mod.
include:
- { image: macos-14, go: '1.23' }
# macos-12 runner has x86_64 support which is needed for old versions of Go
- { image: macos-12, go: '1.13' }
- { image: ubuntu-22.04, go: '1.23' }
- { image: ubuntu-22.04, go: '1.14' }
- { image: ubuntu-22.04, go: '1.13' }
- { image: windows-2022, go: '1.23' }
# Go 1.20 is the earlier version that is still usable in this environment.
# Compilation fails with older versions:
# [...]/bin/ld.exe: [...]\go-link-3209855222\000008.o: in function `x_cgo_thread_start':
# \\_\_\runtime\cgo/gcc_util.c:18: undefined reference to `__imp___iob_func'
- { image: windows-2022, go: '1.20' }
name: Build (${{ matrix.image }}, go ${{ matrix.go }})
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build examples
run: go build ./examples/basic ./examples/bind
run: >
go build
./examples/basic
./examples/bind
- name: Run tests
run: go test

0 comments on commit 2d66b36

Please sign in to comment.