Skip to content

Commit

Permalink
[rayci] build release binaries for all supported platforms (#219)
Browse files Browse the repository at this point in the history
`rayci` only supports linux amd64, `wanda` supports linux amd64, arm64
and windows amd64.
  • Loading branch information
aslonnie authored Apr 22, 2024
1 parent 2ec7831 commit 171bbe0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .buildkite/release.rayci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
group: release
steps:
- name: hello-release
# Use release queue to build rayci and wanda release binaries.
# This makes sure that the release queue is working and also
# builds the releases and save the binaries in build artifacts.
- name: rayci and wanda binaries
instance_type: release
commands:
- echo "Hello, Release!"
- bash release.sh
- cp _release/* /artifact-mount
depends_on: forge
22 changes: 18 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,22 @@ set -euxo pipefail
mkdir -p _release
rm -f _release/*

RAYCI_OS="$(go env GOOS)"
RAYCI_ARCH="$(go env GOARCH)"
function build_rayci {
RAYCI_OS="$1"
RAYCI_ARCH="$2"

go build -trimpath -o "_release/rayci-${RAYCI_OS}-${RAYCI_ARCH}" .
go build -trimpath -o "_release/wanda-${RAYCI_OS}-${RAYCI_ARCH}" ./wanda/wanda
GOOS="$RAYCI_OS" GOARCH="$RAYCI_ARCH" go build -trimpath -o "_release/rayci-${RAYCI_OS}-${RAYCI_ARCH}" .
}

function build_wanda {
RAYCI_OS="$1"
RAYCI_ARCH="$2"

GOOS="$RAYCI_OS" GOARCH="$RAYCI_ARCH" go build -trimpath -o "_release/wanda-${RAYCI_OS}-${RAYCI_ARCH}" ./wanda/wanda
}

build_rayci linux amd64

build_wanda linux amd64
build_wanda linux arm64
build_wanda windows amd64

0 comments on commit 171bbe0

Please sign in to comment.