Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Aptos CLI in CI #931

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/checks-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ jobs:

## any use of Move CLI requires ubuntu-24.04 and to not run on buildjet
move-modules-test:
if: github.event.label.name == 'cicd:bridge' || github.ref == 'refs/heads/main'
# if: github.event.label.name == 'cicd:bridge' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/trusted-relayer'
strategy:
matrix:
include:
Expand All @@ -294,7 +294,7 @@ jobs:

- name: Install Aptos CLI
run: |
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
curl -fsSL "https://raw.githubusercontent.com/andygolay/aptos-cli-install/refs/heads/main/install_cli_v3.5.py" | python3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
Expand Down
16 changes: 8 additions & 8 deletions protocol-units/bridge/setup/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub fn deploy_local_movement_node(config: &mut MovementConfig) -> Result<(), any

pub fn init_movement_node(config: &mut MovementConfig) -> Result<(), anyhow::Error> {
tracing::info!("Start deploy_local_movement_node rpc url:{}", config.mvt_rpc_connection_url());
let mut process = Command::new("movement") //--network
let mut process = Command::new("aptos") //--network
.args(&[
"init",
"--network",
Expand Down Expand Up @@ -257,7 +257,7 @@ pub fn init_movement_node(config: &mut MovementConfig) -> Result<(), anyhow::Err

pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), anyhow::Error> {
tracing::info!("Before compile move modules");
let compile_output = Command::new("movement")
let compile_output = Command::new("aptos")
.args(&["move", "compile", "--package-dir", "protocol-units/bridge/move-modules/"])
.stdout(Stdio::piped())
.stderr(Stdio::piped())
Expand All @@ -269,7 +269,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
if !compile_output.stderr.is_empty() {
tracing::info!("move compile stderr: {}", String::from_utf8_lossy(&compile_output.stderr));
}
let enable_bridge_feature_output = Command::new("movement")
let enable_bridge_feature_output = Command::new("aptos")
.args(&[
"move",
"run-script",
Expand All @@ -296,7 +296,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
);
}

let store_mint_burn_caps_output = Command::new("movement")
let store_mint_burn_caps_output = Command::new("aptos")
.args(&[
"move",
"run-script",
Expand All @@ -323,7 +323,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
);
}

let update_bridge_relayer_output = Command::new("movement")
let update_bridge_relayer_output = Command::new("aptos")
.args(&[
"move",
"run-script",
Expand Down Expand Up @@ -352,7 +352,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
);
}

let set_initiator_time_lock_script_output = Command::new("movement")
let set_initiator_time_lock_script_output = Command::new("aptos")
.args(&[
"move",
"run-script",
Expand Down Expand Up @@ -381,7 +381,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
);
}

let set_counterparty_time_lock_script_output = Command::new("movement")
let set_counterparty_time_lock_script_output = Command::new("aptos")
.args(&[
"move",
"run-script",
Expand Down Expand Up @@ -416,7 +416,7 @@ pub fn deploy_on_movement_framework(config: &mut MovementConfig) -> Result<(), a
}

fn update_mvt_account_address() -> Result<(), anyhow::Error> {
let config_file_path = std::env::current_dir()?.join(".movement/config.yaml");
let config_file_path = std::env::current_dir()?.join(".aptos/config.yaml");
let new_address = "0xA550C18";
let mut tmp_lines: Vec<String> = Vec::new();

Expand Down
Loading