Skip to content

Commit 1928a51

Browse files
committed
.drone.yml: Only enable CGo and -race on linux-amd64
1 parent 4e11f97 commit 1928a51

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.drone.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ steps:
2828
# Do a shallow clone, silent "You are in 'detached HEAD' state..."
2929
- git clone --branch $TAG_NAME --depth 1 $COREDNS_URL $COREDNS_DIR 2> /dev/null
3030
- cd $COREDNS_DIR
31-
- sed -i 's|BUILDOPTS:=-v|BUILDOPTS:=-v -race|g' Makefile
32-
- sed -i 's|CGO_ENABLED:=0|CGO_ENABLED:=1|g' Makefile
3331
- sed -i 's|forward:forward|forward:forward\\\\ndnsredir:dnsredir|g' plugin.cfg
3432
- git diff
3533
- ln -s $DNSREDIR_DIR $COREDNS_DIR/plugin/$(basename $DNSREDIR_DIR)
@@ -40,7 +38,7 @@ steps:
4038
GOARCH: amd64
4139
commands:
4240
- cd /go/src/github.com/coredns/coredns
43-
- make
41+
- make CGO_ENABLED=1 BUILDOPTS="-v -race"
4442
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
4543
- name: build-coredns-linux-arm
4644
image: golang
@@ -49,8 +47,7 @@ steps:
4947
GOARCH: arm
5048
commands:
5149
- cd /go/src/github.com/coredns/coredns
52-
# -race is only supported on 64-bit arch
53-
- make CGO_ENABLED=0 BUILDOPTS=-v
50+
- make
5451
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
5552
- name: build-coredns-linux-arm64
5653
image: golang
@@ -59,8 +56,7 @@ steps:
5956
GOARCH: arm64
6057
commands:
6158
- cd /go/src/github.com/coredns/coredns
62-
# Silent "Error: no such instruction: ..."
63-
- make CGO_ENABLED=0 BUILDOPTS=-v
59+
- make
6460
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
6561
- name: build-coredns-darwin-amd64
6662
image: golang
@@ -69,7 +65,7 @@ steps:
6965
GOARCH: amd64
7066
commands:
7167
- cd /go/src/github.com/coredns/coredns
72-
- make CGO_ENABLED=0 BUILDOPTS=-v
68+
- make
7369
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
7470
- name: build-coredns-windows-amd64
7571
image: golang
@@ -78,7 +74,7 @@ steps:
7874
GOARCH: amd64
7975
commands:
8076
- cd /go/src/github.com/coredns/coredns
81-
- make CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
77+
- make
8278
- mv coredns /go/src/github.com/leiless/dnsredir/bin/coredns_dnsredir-$GOOS-$GOARCH
8379
- name: calc-shasum256
8480
image: alpine

0 commit comments

Comments
 (0)