From 036bbc0252ff9e6b24754921188febf6e8c33cd4 Mon Sep 17 00:00:00 2001 From: Meshi Peled <141231558+meship-starkware@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:28:15 +0200 Subject: [PATCH] chore: make sure that the cairo_native flag works in python (#2465) --- .github/actions/bootstrap/action.yml | 4 ++++ .github/workflows/blockifier_ci.yml | 2 -- .github/workflows/main.yml | 2 -- .github/workflows/upload_artifacts_workflow.yml | 2 +- crates/native_blockifier/Cargo.toml | 2 +- scripts/build_native_blockifier.sh | 5 +++++ 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 5201006e79..61e542a163 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -1,6 +1,10 @@ runs: using: "composite" steps: + # required to clone native as a gitsubmodule + - name: Submodules update. + run: git submodule update --init --recursive + shell: bash - name: Install rust. uses: ./.github/actions/install_rust - name: Install cairo native. diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 8f22ebfcda..f4de270b92 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -48,8 +48,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - # required to clone native as a gitsubmodule - submodules: recursive fetch-depth: 0 - uses: ./.github/actions/bootstrap # No features - build blockifier without features activated by dependencies in the workspace. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07a2b8fe6a..24f25b1b74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,8 +32,6 @@ jobs: # Environment setup. - uses: actions/checkout@v4 with: - # required to clone native as a git submodule - submodules: recursive # Fetch the entire history. Required to checkout the merge target commit, so the diff can # be computed. fetch-depth: 0 diff --git a/.github/workflows/upload_artifacts_workflow.yml b/.github/workflows/upload_artifacts_workflow.yml index 4ed76eafb4..570d924383 100644 --- a/.github/workflows/upload_artifacts_workflow.yml +++ b/.github/workflows/upload_artifacts_workflow.yml @@ -10,7 +10,7 @@ env: jobs: native-blockifier-artifacts-push: - runs-on: starkware-ubuntu-20-04-medium + runs-on: starkware-ubuntu-latest-medium steps: - name: Get commit hash prefix for PR update env: diff --git a/crates/native_blockifier/Cargo.toml b/crates/native_blockifier/Cargo.toml index 4c0ba4ec5d..f89b39baf0 100644 --- a/crates/native_blockifier/Cargo.toml +++ b/crates/native_blockifier/Cargo.toml @@ -27,7 +27,7 @@ crate-type = ["cdylib"] [dependencies] # TODO(Dori, 1/1/2025): Add the "jemalloc" feature to the blockifier crate when possible. -blockifier = { workspace = true, features = ["testing"] } +blockifier = { workspace = true, features = ["cairo_native", "testing"] } cairo-lang-starknet-classes.workspace = true cairo-vm.workspace = true indexmap.workspace = true diff --git a/scripts/build_native_blockifier.sh b/scripts/build_native_blockifier.sh index 7ba7aaa968..dc6b4646d3 100755 --- a/scripts/build_native_blockifier.sh +++ b/scripts/build_native_blockifier.sh @@ -7,6 +7,10 @@ function clean() { rm -rf venv || true } +function init_submodule() { + echo "Initializing submodule..." + git submodule update --init --recursive +} function build() { echo "Building..." @@ -16,4 +20,5 @@ function build() { clean } +init_submodule && build