Skip to content

Commit

Permalink
ci: add an explicit, absolute CAIRO_NATIVE_RUNTIME_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Dec 6, 2024
1 parent 6d017f9 commit 5d7af46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Required to have the proper environment variables set to
# build the starkware-libs/sequencer dependencies with Native mode.

[env]
CAIRO_NATIVE_RUNTIME_LIBRARY = "./libcairo_native_runtime.a"
# The `CAIRO_NATIVE_RUNTIME_LIBRARY` env variable must point to an _ABSOLUTE_ path where
# the `libcairo_native_runtime.a` file will be stored and found.
#
# Since the runtime is built by the blockifier crate's build script, it will be stored
# in blockifier's build directory, unless an absolute path is provided through this env variable.
# This variable must be set before running `cargo build` or `cargo test`,
# to overwrite what might be defined in a `config.toml` file.

# Use `lld` for linking instead of `ld`, since we run out of memory while linking with `ld` on
# 16-cores linux machines, see:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ ef-test-v1: build

# Runs ef-tests with cairo-native mode
ef-test-v1-native: build
cargo test --test tests --no-fail-fast --features "v1,native,ci" -- --nocapture
CAIRO_NATIVE_RUNTIME_LIBRARY=~/.cargo/libcairo_native_runtime.a && cargo test --test tests --no-fail-fast --features "v1,native,ci" -- --nocapture

# Build the rust crates
build:
cargo build --release
CAIRO_NATIVE_RUNTIME_LIBRARY=~/.cargo/libcairo_native_runtime.a && cargo build --release

# Generates a `blockchain-tests-skip.yml` at the project root, by consuming a `data.txt` file containing logs of the ran tests
generate-skip-file:
Expand Down

0 comments on commit 5d7af46

Please sign in to comment.