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

fix(blockifier): fix cairo native required version #3373

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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
Loading