forked from etcd-io/etcd
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.54 KB
/
build.yaml
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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64
- linux-386
- darwin-amd64
- windows-amd64
- linux-arm
- linux-arm64
- linux-ppc64le
- linux-s390x
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.16.3"
- env:
TARGET: ${{ matrix.target }}
run: |
echo "${TARGET}"
case "${TARGET}" in
linux-amd64)
ARCH=amd64 PASSES='build' ./test.sh
;;
linux-386)
ARCH=386 PASSES='build' ./test.sh
;;
darwin-amd64)
ARCH=amd64 GOOS=darwin GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
windows-amd64)
ARCH=amd64 GOOS=windows GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
linux-arm)
ARCH=arm GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
linux-arm64)
ARCH=arm64 GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
linux-ppc64le)
ARCH=ppc64le GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
linux-s390x)
ARCH=s390x GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
*)
echo "Failed to find target"
exit 1
;;
esac