-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.25 KB
/
Copy pathbuild.yml
File metadata and controls
54 lines (43 loc) · 1.25 KB
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
name: Build
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24.4'
- name: Init
run: /bin/bash init_env.sh
- name: Submodule
run: git submodule update --init --recursive
- name: Build amd64
if: matrix.arch == 'amd64'
run: make clean && make build-bpf && make
- name: Build arm64
if: matrix.arch == 'arm64'
run: make clean && make build-bpf && GOOS=linux GOARCH=arm64 go build -o gotproxy ./cmd
- name: Run proxy tests
if: matrix.arch == 'amd64'
run: sudo ./scripts/test_proxy.sh
- name: Run git proxy tests
if: matrix.arch == 'amd64'
env:
TEST_REMOTE_URL: https://github.com/octocat/Hello-World
run: sudo bash ./scripts/test_git.sh
- name: Package artifact
run: tar -czf gotproxy_${{ matrix.arch }}.tar.gz gotproxy
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gotproxy_${{ matrix.arch }}
path: ./gotproxy_${{ matrix.arch }}.tar.gz