Skip to content

Commit 9d1c4ee

Browse files
committedMay 9, 2024
ci: add sui build and test job
1 parent 7a0a5c2 commit 9d1c4ee

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
 
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: SUI Move Build and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
push:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
build:
13+
name: sui move build and test
14+
runs-on: ubuntu-latest
15+
env:
16+
GH_TOKEN: ${{ github.token }}
17+
REPO_OWNER: MystenLabs
18+
REPO_NAME: sui
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
submodules: recursive
23+
24+
- name: Install sui
25+
run: bash -x ./scripts/install_sui.sh
26+
27+
- name: build and test
28+
run: bash ./scripts/optimize-move.sh
29+

‎scripts/install_sui.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
## Install sui binary from latest mainnet release
3+
echo $PWD
4+
repo_url="https://api.github.com/repos/MystenLabs/sui/releases/latest"
5+
latest_tag=$(curl -sSL "$repo_url" | jq -r '.tag_name')
6+
ubuntu_artifact="sui-mainnet-${latest_tag#mainnet-}-ubuntu-x86_64.tgz"
7+
browser_download_url=$(curl -sSL "$repo_url" | jq -r --arg ua "$ubuntu_artifact" '.assets[] | select(.name == $ua) | .browser_download_url')
8+
wget -qO "$ubuntu_artifact" "$browser_download_url"
9+
10+
sudo tar -xzvf "$ubuntu_artifact" -C /usr/local/bin
11+
rm "$ubuntu_artifact"
12+
which sui

0 commit comments

Comments
 (0)