Try to fix travis again

This commit is contained in:
Lan Tian 2019-01-08 15:15:01 +08:00
parent 2844310678
commit d033b9ba3d
No known key found for this signature in database
GPG Key ID: 27F31700E751EC22
3 changed files with 11 additions and 11 deletions

View File

@ -5,19 +5,19 @@ language: go
go:
- "1.10"
env:
# - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=amd64
# - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm32v7
# - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm64v8
# - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=i386
# - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=amd64
# - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm32v7
# - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm64v8
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm32v7
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm64v8
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=i386
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=amd64
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm32v7
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm64v8
install:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- apt-get install -y upx
- sudo apt-get install -y upx
script:
- |
@ -35,7 +35,7 @@ script:
# Build Go binary
mkdir build
GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w" -o build/$PROGRAM $PROGRAM/*.go
GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w -linkmode external -extldflags \"-static\"" -o build/$PROGRAM $PROGRAM/*.go
upx --best build/$PROGRAM
# Build image

View File

@ -3,4 +3,4 @@ FROM multiarch/alpine:${THIS_ARCH_ALT}-edge
LABEL Lan Tian "lantian@lantian.pub"
COPY build/frontend /
ENTRYPOINT ["/lib/ld-musl-x86_64.so.1 /frontend"]
ENTRYPOINT ["/frontend"]

View File

@ -3,4 +3,4 @@ FROM multiarch/alpine:${THIS_ARCH_ALT}-edge
LABEL Lan Tian "lantian@lantian.pub"
COPY build/proxy /
ENTRYPOINT ["/lib/ld-musl-x86_64.so.1 /proxy"]
ENTRYPOINT ["/proxy"]