From 8de1fe807fa8fc813fcd0ca2c320dc885835c72e Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Fri, 24 Jul 2026 14:23:42 +0300 Subject: [PATCH] feat(ci): trying CI retries --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff9b4a8d5..422aa7096 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,12 +209,19 @@ jobs: shared-key: ci-rust-cache save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - - name: Build integration test archive + - name: Build integration test archive (RETRY TEST) uses: ./.github/actions/run-in-ci-image with: image: ${{ needs.ci-image.outputs.image }} env: RISC0_DEV_MODE=1 - run: cargo nextest archive -p integration_tests --archive-file integration-tests.tar.zst --no-pager + run: | + for i in 1 2 3; do + cargo nextest archive -p integration_tests --archive-file integration-tests.tar.zst --no-pager && break + echo "::warning:: Attempt $i failed, cleaning up and retrying..." >&2 + rm -rf target/debug/deps/*.o target/debug/incremental 2>/dev/null || true + cargo clean -p integration_tests 2>/dev/null || true + sleep 5 + done - name: Upload integration test archive uses: actions/upload-artifact@v4 @@ -274,14 +281,21 @@ jobs: with: name: integration-tests-archive - - name: Run tests + - name: Run tests (RETRY TEST) uses: ./.github/actions/run-in-ci-image with: image: ${{ needs.ci-image.outputs.image }} env: | RISC0_DEV_MODE=1 RUST_LOG=info - run: cargo nextest run --archive-file integration-tests.tar.zst -E "binary(${{ matrix.target }})" + run: | + for i in 1 2 3; do + cargo nextest run --archive-file integration-tests.tar.zst -E "binary(${{ matrix.target }})" && break + echo "::warning:: Attempt $i failed, cleaning up and retrying..." >&2 + rm -rf target/debug/deps/*.o target/debug/incremental 2>/dev/null || true + cargo clean -p integration_tests 2>/dev/null || true + sleep 5 + done valid-proof-test: needs: ci-image @@ -305,12 +319,19 @@ jobs: shared-key: ci-rust-cache save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - - name: Test valid proof + - name: Test valid proof (RETRY TEST) uses: ./.github/actions/run-in-ci-image with: image: ${{ needs.ci-image.outputs.image }} env: RUST_LOG=info - run: cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account + run: | + for i in 1 2 3; do + cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account && break + echo "::warning:: Attempt $i failed, cleaning up and retrying..." >&2 + rm -rf target/debug/deps/*.o target/debug/incremental 2>/dev/null || true + cargo clean -p integration_tests 2>/dev/null || true + sleep 5 + done # `just build-artifacts` drives the host's Docker daemon via `cargo risczero # build`, so it goes through the image rather than `container:`.