-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to support two binaries (#3192)
Group effort from Turbo team. - Adds an action to build a go binary - Updates rust wrapper to package go binary in npm package - Switches Linux builds of rust binary to statically link musl, allowing alpine containers to work
- Loading branch information
Greg Soltis
committed
Jan 6, 2023
1 parent
86474aa
commit 616805d
Showing
2 changed files
with
128 additions
and
78 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,87 @@ | ||
name: Build Go Binary | ||
|
||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_branch: | ||
description: "Staging branch to run release from" | ||
|
||
jobs: | ||
smoke-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.release_branch }} | ||
- uses: ./.github/actions/setup-node | ||
with: | ||
enable-corepack: false | ||
- uses: ./.github/actions/setup-go | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Test | ||
run: pnpm -- turbo run test --filter=cli --color | ||
|
||
darwin: | ||
needs: [smoke-test] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.release_branch }} | ||
- run: git fetch origin --tags | ||
- uses: ./.github/actions/setup-go | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Install GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
install-only: true | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
- name: Build Artifacts | ||
run: cd cli && make build-go-turbo-darwin | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: turbo-go-darwin-${{ inputs.release_branch }} | ||
path: cli/dist-darwin | ||
|
||
# compiles linux and windows in a container | ||
cross: | ||
needs: [smoke-test] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker://ghcr.io/vercel/turbo-cross:v1.18.5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: "${{ inputs.release_branch }}" | ||
- run: git fetch origin --tags | ||
- uses: ./.github/actions/setup-go | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Install GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
install-only: true | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
- name: Build Artifacts | ||
run: cd cli && make build-go-turbo-cross | ||
env: | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: turbo-go-cross-${{ inputs.release_branch }} | ||
path: cli/dist-cross |
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