Skip to content

Commit b6804de

Browse files
committed
simplified by using non_benchmarks
1 parent e78209b commit b6804de

File tree

2 files changed

+11
-25
lines changed

2 files changed

+11
-25
lines changed

.github/workflows/sycl-detect-changes.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
filters:
77
description: Matched filters
88
value: ${{ jobs.need_check.outputs.filters }}
9-
benchmarks_only:
10-
description: Whether only benchmarks were changed
11-
value: ${{ jobs.need_check.outputs.benchmarks_only }}
129

1310
permissions: read-all
1411

@@ -19,7 +16,6 @@ jobs:
1916
timeout-minutes: 3
2017
outputs:
2118
filters: ${{ steps.result.outputs.result }}
22-
benchmarks_only: ${{ steps.benchmarks_only.outputs.result }}
2319
steps:
2420
- name: Set changed_files
2521
id: changed_files
@@ -50,7 +46,7 @@ jobs:
5046
- *llvm_spirv
5147
- *clang
5248
- 'libclc/**'
53-
sycl: &sycl
49+
sycl:
5450
- *clang
5551
- *sycl-jit
5652
- *llvm_spirv
@@ -69,8 +65,11 @@ jobs:
6965
- devops/scripts/install_drivers.sh
7066
devigccfg:
7167
- devops/dependencies-igc-dev.json
72-
benchmarks:
68+
benchmarks: &benchmarks
7369
- 'devops/scripts/benchmarks/**'
70+
non_benchmarks:
71+
- '!*benchmarks'
72+
- '**'
7473
perf-tests:
7574
- sycl/test-e2e/PerformanceTests/**
7675
esimd:
@@ -105,19 +104,6 @@ jobs:
105104
return '${{ steps.changes.outputs.changes }}';
106105
}
107106
// Treat everything as changed for huge PRs.
108-
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "esimd", "ur", "ur_cuda_adapter", "ur_offload_adapter"];
107+
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "drivers", "devigccfg", "benchmarks", "non_benchmarks", "perf-tests", "esimd", "ur", "ur_cuda_adapter", "ur_offload_adapter"];
109108
110-
- name: Set benchmarks_only output
111-
id: benchmarks_only
112-
env:
113-
CHANGES: ${{ steps.changes.outputs.changes }}
114-
run: |
115-
has_benchmarks_only=true
116-
for change in $(echo "$CHANGES" | tr -d '[]" ' | tr ',' '\n'); do
117-
if [[ "$change" != "benchmarks" ]]; then
118-
has_benchmarks_only=false
119-
fi
120-
done
121-
echo "result=$has_benchmarks_only" >> $GITHUB_OUTPUT
122-
123-
- run: echo '${{ steps.result.outputs.result }} ${{ steps.benchmarks_only.outputs.result }}'
109+
- run: echo '${{ steps.result.outputs.result }}'

.github/workflows/sycl-linux-precommit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ jobs:
5959
changes: ${{ needs.detect_changes.outputs.filters }}
6060

6161
toolchain_artifact: sycl_linux_default
62-
e2e_binaries_artifact: ${{ needs.detect_changes.outputs.benchmarks_only != 'true' && 'e2e_bin' || '' }}
63-
e2e_binaries_preview_artifact: ${{ needs.detect_changes.outputs.benchmarks_only != 'true' && 'e2e_bin_preview' || '' }}
62+
e2e_binaries_artifact: ${{ contains(needs.detect_changes.outputs.filters, 'non_benchmarks') && 'e2e_bin' || '' }}
63+
e2e_binaries_preview_artifact: ${{ contains(needs.detect_changes.outputs.filters, 'non_benchmarks') && 'e2e_bin_preview' || '' }}
6464

6565
# Build and run native cpu e2e tests separately as cannot currently
6666
# build all the e2e tests
6767
build_run_native_cpu_e2e_tests:
6868
if: |
6969
always() && !cancelled()
7070
&& needs.build.outputs.build_conclusion == 'success'
71-
&& needs.detect_changes.outputs.benchmarks_only == 'false'
71+
&& contains(needs.detect_changes.outputs.filters, 'non_benchmarks')
7272
runs-on: [Linux, build]
7373
needs: [build]
7474
container:
@@ -144,7 +144,7 @@ jobs:
144144
if: |
145145
always() && !cancelled()
146146
&& needs.build.outputs.build_conclusion == 'success'
147-
&& needs.detect_changes.outputs.benchmarks_only == 'false'
147+
&& contains(needs.detect_changes.outputs.filters, 'non_benchmarks')
148148
strategy:
149149
fail-fast: false
150150
matrix:

0 commit comments

Comments
 (0)