File tree Expand file tree Collapse file tree 7 files changed +144
-9
lines changed Expand file tree Collapse file tree 7 files changed +144
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ push :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ build :
13
+ name : Cross compile
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ go-version : [1.16.x]
18
+ os : [ubuntu-latest]
19
+ steps :
20
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : ${{ matrix.go-version }}
24
+ id : go
25
+
26
+ - name : Check out code into the Go module directory
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Build on ${{ matrix.os }}
30
+ env :
31
+ GO111MODULE : on
32
+ GOOS : linux
33
+ run : |
34
+ make crosscompile arg1="'linux/ppc64le linux/mips64'"
Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ push :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ build :
13
+ name : Cross compile
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ go-version : [1.16.x]
18
+ os : [ubuntu-latest]
19
+ steps :
20
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : ${{ matrix.go-version }}
24
+ id : go
25
+
26
+ - name : Check out code into the Go module directory
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Build on ${{ matrix.os }}
30
+ env :
31
+ GO111MODULE : on
32
+ GOOS : linux
33
+ run : |
34
+ make crosscompile arg1="'linux/arm64 linux/s390x'"
Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ push :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ build :
13
+ name : Cross compile
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ go-version : [1.16.x]
18
+ os : [ubuntu-latest]
19
+ steps :
20
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : ${{ matrix.go-version }}
24
+ id : go
25
+
26
+ - name : Check out code into the Go module directory
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Build on ${{ matrix.os }}
30
+ env :
31
+ GO111MODULE : on
32
+ GOOS : linux
33
+ run : |
34
+ make crosscompile arg1="'darwin/amd64 freebsd/amd64'"
Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ push :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ build :
13
+ name : Cross compile
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ go-version : [1.16.x]
18
+ os : [ubuntu-latest]
19
+ steps :
20
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : ${{ matrix.go-version }}
24
+ id : go
25
+
26
+ - name : Check out code into the Go module directory
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Build on ${{ matrix.os }}
30
+ env :
31
+ GO111MODULE : on
32
+ GOOS : linux
33
+ run : |
34
+ make crosscompile arg1="'windows/amd64 linux/arm'"
Original file line number Diff line number Diff line change 31
31
GO111MODULE : on
32
32
GOOS : linux
33
33
run : |
34
- make crosscompile
34
+ make crosscompile arg1="'linux/386 netbsd/amd64'"
Original file line number Diff line number Diff line change 31
31
@GO111MODULE=on gofmt -d cluster/
32
32
33
33
crosscompile :
34
- @ (env bash $( PWD) /cross-compile.sh)
34
+ @ (env bash $( PWD) /cross-compile.sh $( arg1 ) )
35
35
36
36
lint :
37
37
@echo " Running $@ check"
Original file line number Diff line number Diff line change 4
4
# Enable tracing if set.
5
5
[ -n " $BASH_XTRACEFD " ] && set -x
6
6
7
- _init () {
8
- # # All binaries are static make sure to disable CGO.
9
- export CGO_ENABLED=0
7
+ # # All binaries are static make sure to disable CGO.
8
+ export CGO_ENABLED=0
10
9
11
- # # List of architectures and OS to test coss compilation.
12
- SUPPORTED_OSARCH =" linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64"
13
- }
10
+ # # List of architectures and OS to test cross compilation.
11
+ SUPPORTED_OSARCH_DEFAULTS =" linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64"
12
+ SUPPORTED_OSARCH= ${1 :- $SUPPORTED_OSARCH_DEFAULTS }
14
13
15
14
_build () {
16
15
local osarch=$1
@@ -31,4 +30,4 @@ main() {
31
30
done
32
31
}
33
32
34
- _init && main " $@ "
33
+ main " $@ "
You can’t perform that action at this time.
0 commit comments