Skip to content

Commit 3ab6afc

Browse files
committed
Clone
1 parent 64fb105 commit 3ab6afc

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

run_rayci.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,25 @@ TMP_DIR="$(mktemp -d)"
1616

1717
# Legacy path; build from source.
1818

19-
RAYCI_BRANCH="select-prefix-token"
19+
if [ ! -f "/tmp/rayci" ]; then
20+
RAYCI_BRANCH="select-prefix-token"
2021

21-
echo "--- Build rayci locally"
22+
echo "--- Build rayci locally"
2223

23-
readonly GO_VERSION=1.24.5
24-
curl -sfL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -xzf - -C "$TMP_DIR"
25-
export GOROOT="$TMP_DIR/go"
26-
export GOPATH="$TMP_DIR/gopath"
27-
export GOPRIVATE="github.com/ray-project/rayci"
28-
"$TMP_DIR/go/bin/go" build -o "$TMP_DIR/rayci" .
24+
git clone https://github.com/ray-project/rayci.git -b "$RAYCI_BRANCH" "$TMP_DIR/rayci-repo"
25+
cd "$TMP_DIR/rayci-repo"
26+
27+
readonly GO_VERSION=1.24.5
28+
curl -sfL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -xzf - -C "$TMP_DIR"
29+
export GOROOT="$TMP_DIR/go"
30+
export GOPATH="$TMP_DIR/gopath"
31+
export GOPRIVATE="github.com/ray-project/rayci"
32+
"$TMP_DIR/go/bin/go" build -o "/tmp/rayci" .
33+
chmod +x /tmp/rayci
34+
35+
cd -
36+
fi
2937

3038
echo "--- Run rayci"
3139

32-
exec "$TMP_DIR/rayci" "$@"
40+
exec "/tmp/rayci" "$@"

0 commit comments

Comments
 (0)