-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (38 loc) · 1.05 KB
/
tests.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
name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Run test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Install pkg-config on ${{ matrix.os }}
if: matrix.os == 'macos-latest'
run: |
brew install pkg-config
- name: Run tests on macos
if: matrix.os == 'macos-latest'
run: |
export CGO_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2"
go test ./...
- name: Run tests on linux and windows
if: matrix.os != 'macos-latest'
run: |
go test ./...
- name: Build and Install
run: |
go run build/make.go
go run build/make.go --install