Skip to content

Commit

Permalink
chore: make sui workflow reusable (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
npty authored Sep 5, 2024
1 parent a19430c commit 3bcb7d3
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-ghosts-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axelar-network/axelar-cgp-sui': patch
---

chore: refactor gateway contract to use enum
5 changes: 5 additions & 0 deletions .changeset/popular-trains-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axelar-network/axelar-cgp-sui': patch
---

chore: make sui workflow reusable
14 changes: 9 additions & 5 deletions .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Install Dependencies
description: 'Setup Sui CLI and install dependencies'

inputs:
version_file:
description: 'Path to the version.json file'
required: false
default: 'version.json'

runs:
using: 'composite'

steps:
- name: Get Sui Version
shell: bash
run: |
SUI_VERSION=$(jq -r '.SUI_VERSION' version.json)
SUI_VERSION=$(jq -r '.SUI_VERSION' "${{ inputs.version_file }}")
echo "SUI_VERSION=$SUI_VERSION" >> $GITHUB_ENV
- name: Install Dependencies
Expand All @@ -28,11 +34,9 @@ runs:
shell: bash
if: steps.cache-sui.outputs.cache-hit != 'true'
run: |
curl -L -o sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz https://github.com/MystenLabs/sui/releases/download/${{ env.SUI_VERSION }}/sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz
tar -xvf sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz
mkdir -p sui-binaries
mv ./sui ./sui-binaries/
mv ./sui-debug ./sui-binaries/
curl -L -o sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz https://github.com/MystenLabs/sui/releases/download/${{ env.SUI_VERSION }}/sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz
tar -xvf sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz -C sui-binaries
rm -rf sui-${{ env.SUI_VERSION }}-ubuntu-x86_64.tgz
- name: Save Sui binaries
Expand Down
4 changes: 2 additions & 2 deletions move/abi/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/abi/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }

[addresses]
abi = "0xa0"
4 changes: 2 additions & 2 deletions move/axelar_gateway/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/axelar_gateway/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }

[addresses]
axelar_gateway = "0xa1"
Expand Down
4 changes: 2 additions & 2 deletions move/example/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/example/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
AxelarGateway = { local = "../axelar_gateway" }
GasService = { local = "../gas_service" }

Expand Down
4 changes: 2 additions & 2 deletions move/gas_service/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/gas_service/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }

[addresses]
gas_service = "0xa2"
4 changes: 2 additions & 2 deletions move/governance/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/governance/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
AxelarGateway = { local = "../axelar_gateway" }
Abi = { local = "../abi" }

Expand Down
4 changes: 2 additions & 2 deletions move/interchain_token/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/interchain_token/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }

[addresses]
interchain_token = "0xa8"
4 changes: 2 additions & 2 deletions move/its/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/its/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
AxelarGateway = { local = "../axelar_gateway" }
Governance = { local = "../governance" }

Expand Down
4 changes: 2 additions & 2 deletions move/operators/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
2 changes: 1 addition & 1 deletion move/operators/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }

[addresses]
operators = "0xa4"
6 changes: 3 additions & 3 deletions move/squid/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [

[[move.package]]
name = "DeepBook"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/deepbook" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/deepbook" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down Expand Up @@ -58,11 +58,11 @@ dependencies = [

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "testnet-v1.32.0", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.32.2", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
Expand Down
4 changes: 2 additions & 2 deletions move/squid/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.0"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet-v1.32.0" }
DeepBook = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/deepbook", rev = "testnet-v1.32.0" }
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.32.2" }
DeepBook = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/deepbook", rev = "mainnet-v1.32.2" }
AxelarGateway = { local = "../axelar_gateway" }
ITS = { local = "../its" }

Expand Down
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"SUI_VERSION": "testnet-v1.32.0"
}
"SUI_VERSION": "mainnet-v1.32.2"
}

0 comments on commit 3bcb7d3

Please sign in to comment.