From fe03c8c698594d979f4f8a910319931d3bb2fb0d Mon Sep 17 00:00:00 2001 From: x-mass <36629999+x-mass@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:37:30 +0000 Subject: [PATCH] Fix build when recursive checkout takes action --- .github/workflows/pull_request.yml | 9 +++++---- .../workflows/reusable-generate-proofs-linux.yml | 13 ++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index dafd995b..5cd4d8cb 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -83,13 +83,13 @@ jobs: zkllvm_ref="master" zkllvm_repo="NilFoundation/zkLLVM" - echo "$prs_refs" | while read line; do - echo $line + while read -r line; do + echo "$line" if [[ $line == "${zkllvm_repo}:"* ]]; then - zkllvm_ref=$(echo $line | cut -d ' ' -f 2) + zkllvm_ref=$(echo "$line" | cut -d ' ' -f 2) break fi - done + done <<< "$prs_refs" if [[ $zkllvm_ref == refs/pull/* ]]; then echo "Considering reference ${zkllvm_ref} a pr ref" @@ -189,6 +189,7 @@ jobs: with: paths: | /__w/proof-producer/proof-producer/** + !/__w/proof-producer/proof-producer/ !/__w/proof-producer/proof-producer/**/.git/** refs: ${{ needs.handle-syncwith.outputs.prs-refs }} diff --git a/.github/workflows/reusable-generate-proofs-linux.yml b/.github/workflows/reusable-generate-proofs-linux.yml index b96e4147..f88029bb 100644 --- a/.github/workflows/reusable-generate-proofs-linux.yml +++ b/.github/workflows/reusable-generate-proofs-linux.yml @@ -79,12 +79,23 @@ jobs: cc --version cmake --version - - name: Checkout modules to specified refs + # We need to checkout current repo with full history + - name: Checkout current repo to specified ref + if: inputs.refs != '' + uses: NilFoundation/ci-cd/actions/recursive-checkout@v1.1.1 + with: + paths: | + ${{ github.workspace }}/ + refs: ${{ inputs.refs }} + fetch-depth: 0 + + - name: Checkout submodules to specified refs if: inputs.refs != '' uses: NilFoundation/ci-cd/actions/recursive-checkout@v1.1.1 with: paths: | ${{ github.workspace }}/** + !${{ github.workspace }}/ !${{ github.workspace }}/**/.git/** refs: ${{ inputs.refs }}