Skip to content

Commit

Permalink
better ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Apr 6, 2024
1 parent c8d33c7 commit a7f8076
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/proof_verification_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,11 @@ jobs:
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

# temporary solution
- name: Clone custom scarb
run: |
git clone https://github.com/software-mansion/scarb.git
cd scarb
git checkout 9fe97c8eb8620a1e2103e7f5251c5a9189e75716
working-directory: ${{ github.workspace }}

# temporary solution
- name: Build custom scarb
run: cargo build
working-directory: ${{ github.workspace }}/scarb

- name: Build project
run: ./scarb/target/debug/scarb build --no-default-features --features=${{ matrix.layout }},keccak
working-directory: ${{ github.workspace }}
run: scarb build --no-default-features --features=${{ matrix.layout }},keccak

- name: Test project
run: ./scarb/target/debug/scarb test --no-default-features --features=${{ matrix.layout }},keccak
working-directory: ${{ github.workspace }}
run: scarb test --no-default-features --features=${{ matrix.layout }},keccak

- name: Run verification
run: cargo run --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/${{ matrix.layout }}/example_proof.json
working-directory: ${{ github.workspace }}
31 changes: 16 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
formatting-and-testing:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -16,18 +16,19 @@ jobs:

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

# temporary solution
- name: Clone custom scarb
run: |
git clone https://github.com/fmkra/scarb.git
working-directory: ${{ github.workspace }}

# temporary solution
- name: Build custom scarb
run: cargo build
working-directory: ${{ github.workspace }}/scarb


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

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

- name: Run tests
run: ./scarb/target/debug/scarb test
working-directory: ${{ github.workspace }}
run: scarb test --no-default-features --features=${{ matrix.layout }},keccak
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb nightly-2024-03-16
scarb nightly-2024-04-06
starknet-foundry 0.21.0

0 comments on commit a7f8076

Please sign in to comment.