From 32e2213854313a5ed4aa3e1cca682c49dda9fb3b Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Wed, 28 Feb 2024 02:25:48 +0900 Subject: [PATCH] [CI] Move arc test determination to precommit yaml (#12825) Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-detect-changes.yml | 14 +------------ .github/workflows/sycl-linux-precommit.yml | 23 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sycl-detect-changes.yml b/.github/workflows/sycl-detect-changes.yml index 3f9ed1bf5d482..c9059a519e095 100644 --- a/.github/workflows/sycl-detect-changes.yml +++ b/.github/workflows/sycl-detect-changes.yml @@ -6,9 +6,6 @@ on: filters: description: Matched filters value: ${{ jobs.need_check.outputs.filters }} - arc_tests: - description: Tests to run on Arc - value: ${{ jobs.need_check.outputs.arc_tests }} jobs: need_check: @@ -19,7 +16,6 @@ jobs: timeout-minutes: 3 outputs: filters: ${{ steps.result.outputs.result }} - arc_tests: ${{ steps.arc_tests.outputs.arc_tests }} steps: - name: Check file changes uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd @@ -89,12 +85,4 @@ jobs: return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci", "esimd"]; - run: echo '${{ steps.result.outputs.result }}' - - - name: Set Arc tests - id: arc_tests - run: | - if [ "${{ contains(steps.result.outputs.result, 'esimd') }}" == "true" ]; then - echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT" - else - echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT" - fi + diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 206e956dae683..9d86bbc15cf66 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -47,9 +47,28 @@ jobs: build_image: "ghcr.io/intel/llvm/ubuntu2204_build:7ed894ab0acc8ff09262113fdb08940d22654a30" changes: ${{ needs.detect_changes.outputs.filters }} - test: + determine_arc_tests: + name: Decide which Arc tests to run needs: [build, detect_changes] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + # Github's ubuntu-* runners are slow to allocate. Use our CUDA runner since + # we don't use it for anything right now. + runs-on: [Linux, build] + timeout-minutes: 3 + outputs: + arc_tests: ${{ steps.arc_tests.outputs.arc_tests }} + steps: + - name: Determine Arc tests + id: arc_tests + run: | + if [ "${{ contains(needs.detect_changes.outputs.filters, 'esimd') }}" == "true" ]; then + echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT" + else + echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT" + fi + test: + needs: [build, detect_changes, determine_arc_tests] + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} strategy: fail-fast: false matrix: @@ -76,7 +95,7 @@ jobs: reset_gpu: true install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }} extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True - env: '{"LIT_FILTER":${{ needs.detect_changes.outputs.arc_tests }} }' + env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }' uses: ./.github/workflows/sycl-linux-run-tests.yml with: name: ${{ matrix.name }}