-
-
Notifications
You must be signed in to change notification settings - Fork 50
75 lines (75 loc) · 1.81 KB
/
compile.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build
on:
push:
paths-ignore:
- example/**
- README.md
branches:
- "main"
pull_request:
paths-ignore:
- example/**
- README.md
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for Objective-C files.
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '13'
build:
needs: formatting-check
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- macos-13 # Intel
- macos-14
- macos-15
go:
- '^1.22'
- '^1.23'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: vet
run: go vet ./...
- name: Build Linux
run: make -C example/linux
- name: Build GUI Linux
run: make -C example/gui-linux
- name: Build macOS
run: make -C example/macOS
if: runner.arch == 'ARM64'
test:
needs: formatting-check
runs-on: ${{ matrix.os }}
timeout-minutes: 3
strategy:
fail-fast: false
# Can't expand the matrix due to the flakiness of the CI infra
matrix:
os:
- macos-13 # because macOS 14, 15 does not support build on nested virtualization
go:
- '^1.23'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Download Linux kernel
run: make download_kernel
- name: Unit Test
run: make test