-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to latest sequencer with Native support (#768)
* wip: cairo native * use contract executor * update cargo * unskip eip1559 for repro * update to llvm 19 * update remote * bump gas limits * restore skipfile * make tests not quiet * update used rev * fix rev * reduce max steps * nocapture to have more logs in CI * bump native * downgrade native to main * bump native * bump native * latest native main * remove blockchain-skipped tests * bump native * bump native * fix build * bump native * bump cairo * bump native * idk * bump native * bump native * bump native * bump cargo * bump native * fix sequencer build * debug ram only on macos targets * bump native * bump native * bump cairo * custom macro to track long tests * update to latest sequencer * update on main * fix ef-testing crate * restore native feature * bump sequencer to get proper versioned constant parsing * add required dependencies for native build * checkout before using composite actions * make llvm deps in path * fix workflow * install LLVM in action instead of sh script * bump sequencer dep for proper support of serde * fix trunk * remove old llvm in ci * set LLVM_CONFIG var to llvm-19 * add llvm bin to path * apply suggestions
- Loading branch information
Showing
28 changed files
with
1,429 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 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" | ||
|
||
# Use `lld` for linking instead of `ld`, since we run out of memory while linking with `ld` on | ||
# 16-cores linux machines, see: | ||
# https://nnethercote.github.io/perf-book/build-configuration.html#linking. | ||
# TODO: remove this once `rust` stabilizes `lld` as the default linker, currently only on nightly: | ||
# https://github.com/rust-lang/rust/issues/39915#issuecomment-618726211 | ||
[target.x86_64-unknown-linux-gnu] | ||
rustflags = ["-Clink-arg=-fuse-ld=lld"] | ||
env = { "MLIR_SYS_190_PREFIX" = "/usr/lib/llvm-19", "LLVM_SYS_191_PREFIX" = "/usr/lib/llvm-19", "TABLEGEN_190_PREFIX" = "/usr/lib/llvm-19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" } | ||
|
||
[target.x86_64-apple-darwin] | ||
env = { "LIBRARY_PATH" = "/opt/homebrew/lib", "MLIR_SYS_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "LLVM_SYS_191_PREFIX" = "/opt/homebrew/opt/llvm@19", "TABLEGEN_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" } | ||
|
||
[target.aarch64-apple-darwin] | ||
env = { "LIBRARY_PATH" = "/opt/homebrew/lib", "MLIR_SYS_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "LLVM_SYS_191_PREFIX" = "/opt/homebrew/opt/llvm@19", "TABLEGEN_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,95 @@ | ||
--- | ||
name: Workflow - CI | ||
|
||
# trunk-ignore-all(checkov/CKV2_GHA_1) | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
trunk: | ||
name: Trunk | ||
uses: ./.github/workflows/trunk-check.yml | ||
permissions: | ||
checks: write | ||
contents: read | ||
runs-on: ubuntu-24.04 | ||
env: | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@1.82.0 | ||
with: | ||
components: clippy, rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main | ||
repo-name: llvm-repo | ||
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | ||
- name: Update and upgrade APT | ||
shell: bash | ||
run: sudo apt-get update && sudo apt-get upgrade -y | ||
- name: Install LLVM | ||
run: | ||
sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 | ||
clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools | ||
libgmp3-dev libzstd-dev lld libssl-dev zstd | ||
- name: Add llvm bin to PATH | ||
run: echo "/usr/lib/llvm-19/bin" >> $GITHUB_PATH | ||
- name: Trunk Check | ||
uses: trunk-io/trunk-action@v1.1.19 | ||
|
||
tests: | ||
name: Rust tests | ||
uses: ./.github/workflows/test.yml | ||
runs-on: ubuntu-latest-16-cores | ||
env: | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@1.82.0 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main | ||
repo-name: llvm-repo | ||
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | ||
- name: Install LLVM | ||
run: | ||
sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 | ||
clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools | ||
libgmp3-dev libzstd-dev lld libssl-dev zstd | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- name: fetch ef tests | ||
run: make setup | ||
- name: fetch Kakarot | ||
run: make setup-kakarot | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: run tests v0 | ||
run: | | ||
set -o pipefail | ||
make vm-tests-v0-ci | tee test_v0.out | ||
- name: run tests v1 | ||
run: | | ||
make vm-tests-v1-ci | tee test_v1.out | ||
set +o pipefail | ||
- name: Retrieve ef-tests execution resources | ||
run: python scripts/compute_resources.py | ||
env: | ||
KAKAROT_VERSION: v0,v1 | ||
# upload artifacts | ||
- name: upload resources | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./resources/ | ||
name: resources-usage |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.