forked from webview/webview_go
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 2.49 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI Pipeline
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
# Go 1.23 was the latest version as of 2024-08-31 but the action output a "warning":
# Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
# Go 1.22 didn't output the above "warning" so we're using this version.
# Go 1.14 made -mod=vendor default.
# Go 1.13 is the version set in go.mod.
include:
- { image: macos-14, go: '1.22', backend: webview.backend.cocoa_webkit }
# macos-12 runner has x86_64 support which is needed for old versions of Go
- { image: macos-12, go: '1.13', backend: webview.backend.cocoa_webkit }
- { image: ubuntu-22.04, go: '1.22', backend: webview.backend.gtk4_webkitgtk600, apt: libgtk-4-dev libwebkitgtk-6.0-dev }
- { image: ubuntu-22.04, go: '1.22', backend: webview.backend.gtk3_webkitgtk401, apt: libgtk-3-dev libwebkit2gtk-4.1-dev }
- { image: ubuntu-22.04, go: '1.22', backend: webview.backend.gtk3_webkitgtk400, apt: libgtk-3-dev libwebkit2gtk-4.0-dev }
- { image: ubuntu-22.04, go: '1.14', backend: webview.backend.gtk3_webkitgtk401, apt: libgtk-3-dev libwebkit2gtk-4.1-dev }
- { image: ubuntu-22.04, go: '1.13', backend: webview.backend.gtk3_webkitgtk401, apt: libgtk-3-dev libwebkit2gtk-4.1-dev }
- { image: windows-2022, go: '1.22', backend: webview.backend.win32_edge }
# Go 1.20 is the earliest version that is usable in this environment as of 2024-08-31.
# 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', backend: webview.backend.win32_edge }
name: Build (${{ matrix.image }}, go ${{ matrix.go }})
steps:
- uses: actions/checkout@v4
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.apt }}
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build examples
run: >
go build
-tags ${{ matrix.backend }}
./examples/basic
./examples/bind
- name: Run tests
run: >
go test
-tags ${{ matrix.backend }}