Merge pull request #13545 from dbussink/build-apple-m1

server/etcdmain: add build support for Apple M1
This commit is contained in:
Piotr Tabor 2021-12-21 11:00:58 +01:00 committed by GitHub
commit 1e4a345706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,7 @@ jobs:
- linux-amd64
- linux-386
- darwin-amd64
- darwin-arm64
- windows-amd64
- linux-arm
- linux-arm64
@ -34,6 +35,9 @@ jobs:
darwin-amd64)
ARCH=amd64 GOOS=darwin GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
darwin-arm64)
ARCH=arm64 GOOS=darwin GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;
windows-amd64)
ARCH=amd64 GOOS=windows GO_BUILD_FLAGS='-v -mod=readonly' ./build.sh
;;

View File

@ -79,6 +79,10 @@ function main {
TARGET_ARCHS+=("s390x")
fi
if [ ${GOOS} == "darwin" ]; then
TARGET_ARCHS+=("arm64")
fi
for TARGET_ARCH in "${TARGET_ARCHS[@]}"; do
export GOARCH=${TARGET_ARCH}