diff --git a/.github/actions/install-linux-deps/action.yml b/.github/actions/install-linux-deps/action.yml index e827acdaaa..44f80d4956 100644 --- a/.github/actions/install-linux-deps/action.yml +++ b/.github/actions/install-linux-deps/action.yml @@ -1,4 +1,5 @@ name: 'Install Linux Dependencies' +description: "Install linux dependencies for Cairo Native" runs: using: "composite" steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2edf0570b..202c541f12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,54 @@ jobs: - name: test-cairo run: make test-cairo + tests-blockifier: + name: Blockifier tests + 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/ + RUST_LOG: cairo_native=debug + steps: + - name: Checkout Native + uses: actions/checkout@v4 + with: + path: cairo_native + + - name: Checkout Sequencer + uses: actions/checkout@v4 + with: + repository: starkware-libs/sequencer + path: sequencer + ref: apollo-v0.14.0-testnet + - name: Setup rust env + uses: dtolnay/rust-toolchain@1.84.1 + - name: Retreive cached dependecies + 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 + - run: sudo apt-get update && sudo apt-get upgrade -y + - name: Install LLVM + run: sudo apt-get install lld llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools + + - name: Patch Cairo Native in Sequencer + run: | + cd sequencer + # Updates native dependency to local path + new_path='"..\/cairo_native"' + sed -i'' -r "s/^cairo-native = .*/cairo-native.path = $new_path/" Cargo.toml + + git diff + + - name: Run blockifier tests + run: | + cd sequencer + cargo test -p blockifier --features cairo_native + coverage: name: coverage runs-on: ubuntu-24.04