-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (44 loc) · 1.12 KB
/
go.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
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pcap
run: sudo apt install libpcap-dev
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -v ipxbox.go
crosscompile:
strategy:
matrix:
goarch: [386, amd64, arm64]
goos: [darwin, freebsd, linux, windows]
exclude:
- goarch: 386
goos: darwin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: |
mkdir artifacts
cd artifacts
go build -tags nopcap -v ../ipxbox.go
go build -tags nopcap -v ../standalone/ipxbox_uplink.go
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
- name: Upload build
uses: actions/upload-artifact@v1
with:
path: "artifacts"
name: ipxbox_${{ matrix.goos }}_${{ matrix.goarch }}