From a8bad3060ca362c07e37734aac55d58fa5e64c9d Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 11 May 2024 10:51:08 +1200 Subject: [PATCH 1/3] test-build.yml: test-docs should not ignore docs changes --- .github/workflows/test-build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 5966ec3afdf..1cc068c1e5d 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -16,12 +16,23 @@ jobs: cancel_others: 'true' # only run on push *or* pull_request, not both concurrent_skipping: 'same_content_newer' + pre_docs_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + paths_ignore: '["**/README.md"]' + # cancel previous builds if a new commit is pushed + cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' build-yosys: name: Reusable build runs-on: ${{ matrix.os }} - needs: pre_job - if: needs.pre_job.outputs.should_skip != 'true' env: CC: clang strategy: @@ -137,8 +148,8 @@ jobs: test-docs: name: Run docs tests runs-on: ${{ matrix.os }} - needs: [build-yosys, pre_job] - if: needs.pre_job.outputs.should_skip != 'true' + needs: [build-yosys, pre_docs_job] + if: needs.pre_docs_job.outputs.should_skip != 'true' env: CC: clang strategy: From 95bd7c9b0803f072f2e1b4780b8b7fdbce5042ea Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 11 May 2024 11:00:58 +1200 Subject: [PATCH 2/3] test-build.yml Use pre_docs_job for build-yosys pre_job will never skip something that is not skipped by pre_docs_job, so we can gate the build step by pre_docs_job to skip it when the two later jobs are both being skipped. --- .github/workflows/test-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 1cc068c1e5d..20a00639533 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -33,6 +33,8 @@ jobs: build-yosys: name: Reusable build runs-on: ${{ matrix.os }} + needs: pre_docs_job + if: needs.pre_docs_job.outputs.should_skip != 'true' env: CC: clang strategy: From 26b148f455fab2c820402c5f011fb2dab7587091 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 11 May 2024 11:28:16 +1200 Subject: [PATCH 3/3] test-build.yml: Remove duplicated yosys-config --- .github/workflows/test-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 20a00639533..bf95688a15c 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -62,10 +62,6 @@ jobs: run: | ./yosys-config || true - - name: Log yosys-config output - run: | - ./yosys-config || true - - name: Compress build shell: bash run: |