Skip to content

Commit

Permalink
newer runner & ci split
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Mar 20, 2024
1 parent 30dc53c commit 5883ad6
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 44 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Continuous Integration - full testing

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
formatting-and-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Scarb
uses: software-mansion/setup-scarb@v1

- name: Format code
run: scarb fmt --check

- name: Run tests
run: scarb test

verify-layout:
needs: formatting-and-testing
runs-on: ubuntu-latest
strategy:
matrix:
layout: ["dex", "recursive", "recursive_with_poseidon", "small", "starknet"]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Scarb
uses: software-mansion/setup-scarb@v1

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Configure layout
run: python configure.py -l ${{ matrix.layout }} -s keccak

- name: Build project
run: scarb build

- name: Run verification
run: cargo run --release --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/${{ matrix.layout }}/example_proof.json
21 changes: 21 additions & 0 deletions .github/workflows/partial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Continuous Integration - partial testing

on:
push:
pull_request:

jobs:
formatting-and-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Scarb
uses: software-mansion/setup-scarb@v1

- name: Format code
run: scarb fmt --check

- name: Run tests
run: scarb test
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
scarb 2.6.0
scarb nightly-2024-03-16
starknet-foundry 0.20.0
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ version = "0.1.0"
[workspace.dependencies]
anyhow = "1"
cairo-felt = "0.9"
cairo-lang-casm = "=2.6.0"
cairo-lang-runner = "=2.6.0"
cairo-lang-sierra = "=2.6.0"
cairo-lang-utils = "=2.6.0"
cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo/" }
cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo/" }
cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo/" }
cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo/" }
cairo-proof-parser = { git = "https://github.com/Okm165/cairo-proof-parser" }
cairo-vm = "=0.9.2"
clap = { version = "4.5.2", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn main() -> anyhow::Result<()> {
let result = runner
.run_function_with_starknet_context(
func,
&[Arg::Array(proof.to_vec())],
&[Arg::Array(proof.into_iter().map(Arg::Value).collect_vec())],
Some(u32::MAX as usize),
Default::default(),
)
Expand Down

0 comments on commit 5883ad6

Please sign in to comment.