From a7f8076d9d935efddda9aed2ecb42ef0c4a17462 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Sat, 6 Apr 2024 07:58:35 +0200 Subject: [PATCH] better ci --- .../workflows/proof_verification_tests.yml | 20 ++---------- .github/workflows/tests.yml | 31 ++++++++++--------- .tool-versions | 2 +- 3 files changed, 19 insertions(+), 34 deletions(-) diff --git a/.github/workflows/proof_verification_tests.yml b/.github/workflows/proof_verification_tests.yml index b8452bcd6..85999e5b8 100644 --- a/.github/workflows/proof_verification_tests.yml +++ b/.github/workflows/proof_verification_tests.yml @@ -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 }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6c3bdf4e..ab23d6d38 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - formatting-and-testing: + formatting: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -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 }} \ No newline at end of file + run: scarb test --no-default-features --features=${{ matrix.layout }},keccak diff --git a/.tool-versions b/.tool-versions index b58dd3c3d..284db3b57 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -scarb nightly-2024-03-16 +scarb nightly-2024-04-06 starknet-foundry 0.21.0