Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
MacOS arm64 requires MacOS build host
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmasala committed Mar 8, 2022
1 parent 78717a1 commit b402683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Build for MacOS
run: sudo make docker-build-macos
- name: Build for MacOS (amd64)
run: GOARCH="amd64" go build -trimpath -ldflags=-buildid= -o catchat-macos-amd64

- name: Build for MacOS (arm64)
run: CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -trimpath -ldflags=-buildid= -tags dynamic -o catchat-macos-arm64

- name: Upload binary artifact
uses: actions/upload-artifact@v2
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ docker-build-linux: docker-go-mod
docker-build-windows: docker-go-mod
docker run --rm -v "$(shell readlink -f .)":/go/catchat/ catchat/go_mod bash -c 'cd /go/catchat/; GOOS=windows go build -trimpath -ldflags="-H windowsgui -buildid=" -o catchat.exe'

docker-build-macos: docker-go-mod
docker run --rm -v "$(shell readlink -f .)":/go/catchat/ catchat/go_mod bash -c 'cd /go/catchat/; GOARCH="amd64" go build -trimpath -ldflags=-buildid= -o catchat-macos-amd64'
docker run --rm -v "$(shell readlink -f .)":/go/catchat/ catchat/go_mod bash -c 'cd /go/catchat/; CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -trimpath -ldflags=-buildid= -tags dynamic -o catchat-macos-arm64'

docker-debian-base:
if ! docker images|grep catchat/debian_base; then \
docker run --name catchat_debian_base golang:buster bash -c 'apt update && apt upgrade -y && apt install -y --no-install-recommends build-essential libgles2 libgles2-mesa-dev libglib2.0-dev libxkbcommon-dev libxkbcommon-x11-dev libglu1-mesa-dev libxcursor-dev libwayland-dev libx11-xcb-dev libvulkan-dev' \
Expand Down

0 comments on commit b402683

Please sign in to comment.