Fix windows/arm64 build

This commit is contained in:
Maddie Zhan 2021-09-18 13:54:48 +08:00
parent bee29e8b7e
commit 42cc7740a5

View File

@ -4,80 +4,102 @@ before:
hooks: hooks:
- go mod download - go mod download
builds: builds:
- main: ./main.go - main: ./main.go
id: speedtest-backend id: speedtest-backend
binary: speedtest-backend binary: speedtest-backend
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
flags: flags:
- -trimpath - -trimpath
ldflags: ldflags:
- -w -s - -w -s
goos: goos:
- windows - windows
- linux - linux
- darwin - darwin
goarch: goarch:
- 386 - 386
- amd64 - amd64
- arm - arm
- arm64 - arm64
- mips - mips
- mipsle - mipsle
goarm: goarm:
- 5 - 5
- 6 - 6
- 7 - 7
gomips: gomips:
- hardfloat - hardfloat
- softfloat - softfloat
ignore: ignore:
- goos: darwin - goos: darwin
goarch: 386 goarch: 386
hooks: - goos: windows
post: upx -9 "{{ .Path }}" goarch: arm
- main: ./main.go - goos: windows
id: speedtest-backend-freebsd goarch: arm64
binary: speedtest-backend hooks:
env: post: upx -9 "{{ .Path }}"
- CGO_ENABLED=0 - main: ./main.go
flags: id: speedtest-backend-freebsd
- -trimpath binary: speedtest-backend
ldflags: env:
- -w -s - CGO_ENABLED=0
goos: flags:
- freebsd - -trimpath
goarch: ldflags:
- 386 - -w -s
- amd64 goos:
- arm - freebsd
- arm64 goarch:
- mips - 386
- mipsle - amd64
goarm: - arm
- 5 - arm64
- 6 - mips
- 7 - mipsle
gomips: goarm:
- hardfloat - 5
- softfloat - 6
- main: ./main.go - 7
id: speedtest-backend-noupx gomips:
binary: speedtest-backend - hardfloat
env: - softfloat
- CGO_ENABLED=0 - main: ./main.go
flags: id: speedtest-backend-noupx-linux
- -trimpath binary: speedtest-backend
ldflags: env:
- -w -s - CGO_ENABLED=0
goos: flags:
- linux - -trimpath
goarch: ldflags:
- mips64 - -w -s
- mips64le goos:
gomips: - linux
- hardfloat goarch:
- softfloat - mips64
- mips64le
gomips:
- hardfloat
- softfloat
- main: ./main.go
id: speedtest-backend-noupx-windows-arm64
binary: speedtest-backend
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -w -s
goos:
- windows
goarch:
- arm
- arm64
goarm:
- 5
- 6
- 7
archives: archives:
- format_overrides: - format_overrides:
- goos: windows - goos: windows