-
Notifications
You must be signed in to change notification settings - Fork 56
93 lines (71 loc) · 1.94 KB
/
cross-build.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: "Cross Build"
on: [ push,pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build_js_wasm:
name: Build js wasm
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: GOOS=js GOARCH=wasm go build ./...
build_386:
name: Build 386
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
# Since go 1.15, 386 support for darwin has been dropped.
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: GOARCH=386 go build ./...
build_arm:
name: Build arm
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
# Since go 1.15, arm support for darwin has been dropped.
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: GOARCH=arm go build ./...
build_arm64:
name: Build arm64
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: GOARCH=arm64 go build ./...