From ed6f130c017ee5fe22292dd4be0536eb3804e94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Wed, 11 Sep 2024 15:17:38 -0400 Subject: [PATCH] ci: Optimize PLONK params handling in CI workflow - Modify Continuous Integration (CI) workflows to cache PLONK parameters instead of simply downloading and unpacking them. - Define conditions to resort to downloading and untarring PLONK params only when cache is not available. --- .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 39166a2..631ab61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,8 +36,15 @@ jobs: - name: Build with Cabal run: cabal build - # Download and untar the required file - - name: Download and untar PLONK params + # Cache PLONK params download + - name: Cache PLONK params + uses: actions/cache@v3 + with: + path: ~/.sp1/circuits/plonk_bn254/v1.0.8-testnet + key: plonk-params-v1.0.8-testnet + + - name: Download and untar PLONK params (if not cached) + if: steps.cache-plonk-params.outputs.cache-hit != 'true' run: | mkdir -p ~/.sp1/circuits/plonk_bn254/v1.0.8-testnet wget https://sphinx-plonk-params.s3.amazonaws.com/v1.0.8-testnet.tar.gz -O plonk_params.tar.gz