Skip to content

Commit

Permalink
fix(blockifier): fix cairo native required version
Browse files Browse the repository at this point in the history
  • Loading branch information
noaov1 committed Jan 16, 2025
1 parent b43ae77 commit dd8fd5a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/blockifier_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ on:
- 'scripts/dependencies.sh'
- 'scripts/install_build_tools.sh'
- 'scripts/sequencer-ci.Dockerfile'
- 'crates/starknet_sierra_compile/build.rs'

env:
RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upload_artifacts_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
- 'scripts/dependencies.sh'
- 'scripts/install_build_tools.sh'
- 'scripts/sequencer-ci.Dockerfile'
- 'crates/starknet_sierra_compile/build.rs'

# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/starknet-native-compile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "starknet-native-compile"
# The version of this crate should equal the version of cairo-native.
version = "0.2.5"
version = "0.2.5-rc2"
edition = "2021"
repository = "https://github.com/starkware-libs/sequencer/"
license = "Apache-2.0"
Expand Down
12 changes: 9 additions & 3 deletions crates/starknet_sierra_compile/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {

const REQUIRED_CAIRO_LANG_VERSION: &str = "2.7.1";
#[cfg(feature = "cairo_native")]
const REQUIRED_CAIRO_NATIVE_VERSION: &str = "0.2.5";
const REQUIRED_CAIRO_NATIVE_VERSION: &str = "0.2.5-rc2";

/// Downloads the Cairo crate from StarkWare's release page and extracts its contents into the
/// `target` directory. This crate includes the `starknet-sierra-compile` binary, which is used to
Expand Down Expand Up @@ -59,7 +59,11 @@ fn install_starknet_native_compile() {
install_compiler_binary(binary_name, required_version, cargo_install_args);
}

fn install_compiler_binary(binary_name: &str, required_version: &str, cargo_install_args: &[&str]) {
fn install_compiler_binary(
binary_name: &str,
required_version: &str,
_cargo_install_args: &[&str],
) {
let binary_path = binary_path(out_dir(), binary_name);
println!("cargo:rerun-if-changed={}", binary_path.to_str().unwrap());

Expand Down Expand Up @@ -88,10 +92,12 @@ fn install_compiler_binary(binary_name: &str, required_version: &str, cargo_inst
let install_command_status = Command::new("cargo")
.args([
"install",
binary_name,
"--version",
required_version,
"--root",
temp_cargo_path.path().to_str().expect("Failed to convert cargo_path to str"),
])
.args(cargo_install_args)
.status()
.unwrap_or_else(|_| panic!("Failed to install {binary_name}"));

Expand Down

0 comments on commit dd8fd5a

Please sign in to comment.