-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
29 lines (27 loc) · 1.05 KB
/
.gitlab-ci.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
stages:
- test
- build
test:
stage: test
image: golang:1.23-bullseye
script:
- go test ./...
build:
stage: build
image: golang:1.23-bullseye
variables:
CGO_ENABLED: 0
script:
- cd cmd/tunnel-client
- go build -ldflags "-X main.defaultServer=$DEFAULT_SERVER" -o tunnel-client-linux-amd64
- GOOS=linux GOARCH=arm64 go build -ldflags "-X main.defaultServer=$DEFAULT_SERVER" -o tunnel-client-linux-arm64
- GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.defaultServer=$DEFAULT_SERVER" -o tunnel-client-darwin-amd64
- GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.defaultServer=$DEFAULT_SERVER" -o tunnel-client-darwin-arm64
- GOOS=windows GOARCH=amd64 go build -ldflags "-X main.defaultServer=$DEFAULT_SERVER" -o tunnel-client-amd64.exe
artifacts:
paths:
- cmd/tunnel-client/tunnel-client-linux-amd64
- cmd/tunnel-client/tunnel-client-linux-arm64
- cmd/tunnel-client/tunnel-client-darwin-amd64
- cmd/tunnel-client/tunnel-client-darwin-arm64
- cmd/tunnel-client/tunnel-client-amd64.exe