From ecc9586c5c00a767fb891caa8c7341e4995fdea5 Mon Sep 17 00:00:00 2001 From: Yukinari Hisaki <42021302+yhisaki@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:23:05 +0900 Subject: [PATCH] feat(build-and-test-differential): skip cuda build when tag:require-cuda-build-and-test is not attached (#8562) * feat(build-and-test-differential): skip cuda build when tag:require-cuda-build-and-test is not attached Signed-off-by: Y.Hisaki * fix miss Signed-off-by: Y.Hisaki * for debugging Signed-off-by: Y.Hisaki * fix bug Signed-off-by: Y.Hisaki * remove debug code Signed-off-by: Y.Hisaki --------- Signed-off-by: Y.Hisaki --- .github/workflows/build-and-test-differential.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 48d432861f1de..5e1f3e2c093a5 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -22,8 +22,13 @@ jobs: with: label: tag:run-build-and-test-differential + make-sure-require-cuda-label-is-present: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: tag:require-cuda-build-and-test + build-and-test-differential: - needs: make-sure-label-is-present + needs: [make-sure-label-is-present, make-sure-require-cuda-label-is-present] if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }} runs-on: ${{ matrix.runner }} container: ${{ matrix.container }}${{ matrix.container-suffix }} @@ -57,6 +62,7 @@ jobs: fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: Run build-and-test-differential action + if: ${{ !(matrix.container-suffix == '-cuda') || needs.make-sure-require-cuda-label-is-present.outputs.result == 'true' }} uses: ./.github/actions/build-and-test-differential with: rosdistro: ${{ matrix.rosdistro }}