From 6dac887c2d2ccac6a99184c8bcc54fad9c7541d4 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 2 Jan 2024 16:18:33 +0000 Subject: [PATCH 1/3] CI: Migrate to `{upload, download}-artifact@v4` --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c0992533dc..ae0d4ccb1ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: -j"${{ steps.nproc.outputs.count }}" - name: Upload zcashd artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zcashd-${{ matrix.name }} path: | @@ -137,14 +137,14 @@ jobs: - name: Upload zcash-btest artifact if: matrix.test_os != '' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zcash-btest-${{ matrix.name }} path: ${{ format('src/test/test_bitcoin{0}', matrix.file_ext) }} - name: Upload zcash-gtest artifact if: matrix.test_os != '' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zcash-gtest-${{ matrix.name }} path: ${{ format('src/zcash-gtest{0}', matrix.file_ext) }} @@ -232,7 +232,7 @@ jobs: include: ${{ fromJson(needs.matrices.outputs.test_matrix) }} steps: - name: Download zcash-btest artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: zcash-btest-${{ matrix.name }} - name: Make artifact executable @@ -253,7 +253,7 @@ jobs: include: ${{ fromJson(needs.matrices.outputs.test_matrix) }} steps: - name: Download zcash-gtest artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: zcash-gtest-${{ matrix.name }} - name: Make artifact executable From ab2a77b236a424bd18baa061a426ff3b7e663bd4 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 2 Jan 2024 16:20:16 +0000 Subject: [PATCH 2/3] CI: Fix name for gtest job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae0d4ccb1ba..e8661cf1350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -242,7 +242,7 @@ jobs: run: ${{ format('./test_bitcoin{0}', matrix.file_ext) }} -p test-gtest: - name: GoogleTest tier ${{ matrix.tier }} platform ${{ matrix.platform }} - shard ${{ matrix.gtest_shards }} + name: GoogleTest tier ${{ matrix.tier }} platform ${{ matrix.platform }} - shard ${{ matrix.shard_index }} needs: [matrices, build] runs-on: ${{ matrix.test_os }} continue-on-error: ${{ matrix.tier != 1 }} From 399353c76bc590e4b5d2efbea6f1fa4b82645d6f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 2 Jan 2024 16:27:24 +0000 Subject: [PATCH 3/3] CI: Run bitrot build jobs in parallel These were previously run serially in the same job to take advantage of caching from earlier build files. However, after the main build was split into a separate job, `actions/cache` is primed by it, so all of the bitrot tests are going to start with caches and don't need to rely on cross-build-flag caching. --- .github/workflows/ci.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8661cf1350..1aa1f753597 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,7 @@ jobs: outputs: build_matrix: ${{ steps.set-matrices.outputs.build_matrix }} + build_names: ${{ steps.set-matrices.outputs.build_names }} test_matrix: ${{ steps.set-matrices.outputs.test_matrix }} test_names: ${{ steps.set-matrices.outputs.test_names }} steps: @@ -65,6 +66,7 @@ jobs: CFG: ${{ toJSON(matrix.cfg) }} run: | jq -r -n 'env.CFG | fromjson | @json "build_matrix=\(.data)"' >> $GITHUB_OUTPUT + jq -r -n 'env.CFG | fromjson | [.data[] | .name] | @json "build_names=\(.)"' >> $GITHUB_OUTPUT jq -r -n 'env.CFG | fromjson | [.data[] | select(.test_os)] | @json "test_matrix=\(.)"' >> $GITHUB_OUTPUT jq -r -n 'env.CFG | fromjson | [.data[] | select(.test_os) | .name] | @json "test_names=\(.)"' >> $GITHUB_OUTPUT @@ -150,12 +152,17 @@ jobs: path: ${{ format('src/zcash-gtest{0}', matrix.file_ext) }} bitrot: - name: Bitrot check tier ${{ matrix.tier }} platform ${{ matrix.platform }} + name: Bitrot check tier ${{ matrix.tier }} platform ${{ matrix.platform }} flag '${{ matrix.configure_flag }}' needs: [matrices, build] runs-on: ${{ matrix.build_os }} continue-on-error: ${{ matrix.tier == 3 }} strategy: matrix: + name: ${{ fromJson(needs.matrices.outputs.build_names) }} + configure_flag: + - '--with-libs' + - '--disable-wallet' + - '--disable-mining' include: ${{ fromJson(needs.matrices.outputs.build_matrix) }} steps: @@ -201,23 +208,9 @@ jobs: shell: bash run: echo "count=$(nproc 2> /dev/null || sysctl -n hw.logicalcpu)" >> "$GITHUB_OUTPUT" - - name: Build zcashd with libraries enabled + - name: Build zcashd with the flag being checked run: > - CONFIGURE_FLAGS="--with-libs" - ${{ matrix.host }} - ./zcutil/build.sh - -j"${{ steps.nproc.outputs.count }}" - - - name: Build zcashd with wallet disabled - run: > - CONFIGURE_FLAGS="--disable-wallet" - ${{ matrix.host }} - ./zcutil/build.sh - -j"${{ steps.nproc.outputs.count }}" - - - name: Build zcashd with mining disabled - run: > - CONFIGURE_FLAGS="--disable-mining" + CONFIGURE_FLAGS="${{ matrix.configure_flag }}" ${{ matrix.host }} ./zcutil/build.sh -j"${{ steps.nproc.outputs.count }}"