From 45d8684e7baa6195aaa97350ac425ffe2ea593c7 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Wed, 12 Jun 2024 19:21:49 +0200 Subject: [PATCH 1/4] fix Rust toolchain caching --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66373e7c93..53f636134f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,8 +138,11 @@ jobs: - name: Install Rust toolchain if: steps.cache-cairo-vm.outputs.cache-hit != 'true' uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + cache-on-failure: false - name: Install RISC0 VM + if: steps.cache-cairo-vm.outputs.cache-hit != 'true' shell: bash run: | cargo install cargo-binstall From ea0b780bdddd09b2c2238a3c6d21a11e08e1ccd9 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Wed, 12 Jun 2024 19:45:24 +0200 Subject: [PATCH 2/4] cache RISC0 VM --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53f636134f..9cdcefc214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,14 +135,21 @@ jobs: path: ${{ env.HOME }}/.local/bin/juvix-cairo-vm key: ${{ runner.os }}-cairo-vm-${{ env.CAIRO_VM_VERSION }} + - name: Cache RISC0 VM + id: cache-risc0-vm + uses: actions/cache@v4 + with: + path: ${{ env.HOME }}/.cargo/bin/r0vm + key: ${{ runner.os }}-risc0-vm-${{ env.RISC0_VM_VERSION }} + - name: Install Rust toolchain - if: steps.cache-cairo-vm.outputs.cache-hit != 'true' + if: steps.cache-cairo-vm.outputs.cache-hit != 'true' || steps.cache-risc0-vm.outputs.cache-hit != 'true' uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache-on-failure: false - name: Install RISC0 VM - if: steps.cache-cairo-vm.outputs.cache-hit != 'true' + if: steps.cache-risc0-vm.outputs.cache-hit != 'true' shell: bash run: | cargo install cargo-binstall From 5ca58e4a63a89a9249fc7afb8714843d026f6cb9 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Wed, 12 Jun 2024 20:41:58 +0200 Subject: [PATCH 3/4] update ci --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cdcefc214..ce8c30f5e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: id: cache-risc0-vm uses: actions/cache@v4 with: - path: ${{ env.HOME }}/.cargo/bin/r0vm + path: ${{ env.HOME }}/.local/bin/r0vm key: ${{ runner.os }}-risc0-vm-${{ env.RISC0_VM_VERSION }} - name: Install Rust toolchain @@ -152,9 +152,10 @@ jobs: if: steps.cache-risc0-vm.outputs.cache-hit != 'true' shell: bash run: | - cargo install cargo-binstall - cargo binstall cargo-risczero@1.0.1 --no-confirm + cargo install cargo-binstall --force + cargo binstall cargo-risczero@1.0.1 --no-confirm --force cargo risczero install + cp `which r0vm` $HOME/.local/bin/r0vm - name: Checkout CairoVM uses: actions/checkout@v4 From 8d8dbc31af5908de2229028e847a91dd926eb8e4 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Wed, 12 Jun 2024 22:10:20 +0200 Subject: [PATCH 4/4] don't cache RISC0 VM --- .github/workflows/ci.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce8c30f5e0..079255940d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,27 +135,18 @@ jobs: path: ${{ env.HOME }}/.local/bin/juvix-cairo-vm key: ${{ runner.os }}-cairo-vm-${{ env.CAIRO_VM_VERSION }} - - name: Cache RISC0 VM - id: cache-risc0-vm - uses: actions/cache@v4 - with: - path: ${{ env.HOME }}/.local/bin/r0vm - key: ${{ runner.os }}-risc0-vm-${{ env.RISC0_VM_VERSION }} - - name: Install Rust toolchain - if: steps.cache-cairo-vm.outputs.cache-hit != 'true' || steps.cache-risc0-vm.outputs.cache-hit != 'true' + if: steps.cache-cairo-vm.outputs.cache-hit != 'true' uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache-on-failure: false - name: Install RISC0 VM - if: steps.cache-risc0-vm.outputs.cache-hit != 'true' shell: bash run: | cargo install cargo-binstall --force cargo binstall cargo-risczero@1.0.1 --no-confirm --force cargo risczero install - cp `which r0vm` $HOME/.local/bin/r0vm - name: Checkout CairoVM uses: actions/checkout@v4