Skip to content

Commit

Permalink
[CI] Move arc test determination to precommit yaml (#12825)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
  • Loading branch information
sarnex authored Feb 27, 2024
1 parent e83a1f1 commit 32e2213
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/sycl-detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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

23 changes: 21 additions & 2 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down

0 comments on commit 32e2213

Please sign in to comment.