-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build multi-architecture binary (#6)
* feat: build multi-architecture binary * Not linting at the moment
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
on: | ||
- pull_request | ||
|
||
name: Test | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: download deps | ||
run: go get . | ||
|
||
- name: Test | ||
run: go test | ||
|
||
build-binary: | ||
name: Build multi-architecture binary | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: download deps | ||
run: go get . | ||
|
||
- name: Build | ||
run: ./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
GOOS=darwin GOARCH=amd64 go build -o gradle-subproject-resolver-amd64 *.go | ||
GOOS=darwin GOARCH=arm64 go build -o gradle-subproject-resolver-arm64 *.go | ||
lipo -create -output gradle-subproject-resolver gradle-subproject-resolver-amd64 gradle-subproject-resolver-arm64 | ||
|
||
rm -f gradle-subproject-resolver-amd64 gradle-subproject-resolver-arm64 |