Skip to content

Commit 00745d1

Browse files
Handle common options across run_cities calls.
1 parent 9099bab commit 00745d1

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

.github/workflows/run_ock_internal_tests.yml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,16 @@ permissions:
5959
packages: read
6060

6161
jobs:
62-
set_opencl_cts_path:
63-
# Set an inter-job multiline env var for opencl_cts artifact download "path:" content
62+
set_env_vars:
63+
# Set inter-job multiline env vars for:
64+
# opencl_cts artifact download "path:" content
65+
# common run_cities options
6466
runs-on: ubuntu-latest
6567
outputs:
6668
path_spec: ${{ steps.path_id.outputs.OPENCL_CTS_PATH }}
69+
run_cities_options: ${{ steps.run_cities_id.outputs.COMMON_RUN_CITIES_OPTIONS }}
6770
steps:
68-
- name: set var
71+
- name: set path var
6972
id: path_id
7073
run: |
7174
echo "OPENCL_CTS_PATH<<EOF" >> $GITHUB_OUTPUT
@@ -81,6 +84,21 @@ jobs:
8184
echo '!test_conformance/test_common/**' >> $GITHUB_OUTPUT
8285
# ... PATH END
8386
echo "EOF" >> $GITHUB_OUTPUT
87+
- name: set run_cities var
88+
id: run_cities_id
89+
run: |
90+
echo "COMMON_RUN_CITIES_OPTIONS<<EOF2" >> $GITHUB_OUTPUT
91+
# COMMON RUN_CITIES OPTIONS START ...
92+
echo '-s $GITHUB_WORKSPACE/scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv \\' >> $GITHUB_OUTPUT
93+
echo '-b $GITHUB_WORKSPACE/test_conformance \\' >> $GITHUB_OUTPUT
94+
echo '-L $GITHUB_WORKSPACE/build/lib \\' >> $GITHUB_OUTPUT
95+
echo '-e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/build/lib/libCL.so \\' >> $GITHUB_OUTPUT
96+
echo '-e OCL_ICD_VENDORS=/dev/null \\' >> $GITHUB_OUTPUT
97+
echo '--timeout 00:10:00 \\' >> $GITHUB_OUTPUT
98+
echo '--verbose \\' >> $GITHUB_OUTPUT
99+
echo '-l $GITHUB_WORKSPACE/build/cts.log -f $GITHUB_WORKSPACE/build/cts.fail' >> $GITHUB_OUTPUT
100+
# ... COMMON RUN_CITIES OPTIONS END
101+
echo "EOF2" >> $GITHUB_OUTPUT
84102
85103
# build and run host x86_64, execute UnitCL and lit tests and build and run offline
86104
run_host_x86_64:
@@ -293,9 +311,10 @@ jobs:
293311
run-ubuntu-gcc-x86_64-riscv-cl3-0:
294312
#if: contains(inputs.target_list, 'host_riscv64_linux')
295313
if: contains(inputs.target_list, 'host_x86_64_linux')
296-
needs: [set_opencl_cts_path]
314+
needs: [set_env_vars]
297315
env:
298-
OPENCL_CTS_PATH: ${{ needs.set_opencl_cts_path.outputs.path_spec }}
316+
OPENCL_CTS_PATH: ${{ needs.set_env_vars.outputs.path_spec }}
317+
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
299318
runs-on: ubuntu-22.04
300319
container:
301320
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
@@ -324,24 +343,19 @@ jobs:
324343
run: |
325344
set -x
326345
python3 $GITHUB_WORKSPACE/scripts/testing/run_cities.py \
327-
-s $GITHUB_WORKSPACE/scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv \
328-
-b $GITHUB_WORKSPACE/test_conformance \
346+
${{ env.COMMON_RUN_CITIES_OPTIONS }} \
329347
-e "CA_RISCV_VF=1,S" \
330-
-L $GITHUB_WORKSPACE/build/lib \
331-
-e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/build/lib/libCL.so \
332-
-e OCL_ICD_VENDORS=/dev/null \
333-
--timeout 00:10:00 \
334-
--verbose \
335-
-l $GITHUB_WORKSPACE/build/cts.log -f $GITHUB_WORKSPACE/build/cts.fail -r $GITHUB_WORKSPACE/build/cts_riscv_1s.xml
348+
-r $GITHUB_WORKSPACE/build/cts_riscv_1s.xml
336349
ninja -C $GITHUB_WORKSPACE/build check-ock
337350
338351
# Based on: mr-ubuntu-gcc-x86_64-riscv-cl3-0-part2
339352
run-ubuntu-gcc-x86_64-riscv-cl3-0-part2:
340353
#if: contains(inputs.target_list, 'host_riscv64_linux')
341354
if: contains(inputs.target_list, 'host_x86_64_linux')
342-
needs: [set_opencl_cts_path]
355+
needs: [set_env_vars]
343356
env:
344-
OPENCL_CTS_PATH: ${{ needs.set_opencl_cts_path.outputs.path_spec }}
357+
OPENCL_CTS_PATH: ${{ needs.set_env_vars.outputs.path_spec }}
358+
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
345359
runs-on: ubuntu-22.04
346360
container:
347361
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
@@ -373,15 +387,9 @@ jobs:
373387
run: |
374388
set -x
375389
python3 $GITHUB_WORKSPACE/scripts/testing/run_cities.py \
376-
-s $GITHUB_WORKSPACE/scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv \
377-
-b $GITHUB_WORKSPACE/test_conformance \
390+
${{ env.COMMON_RUN_CITIES_OPTIONS }} \
378391
-e "CA_RISCV_VF=1,S,VP" \
379-
-e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/build/lib/libCL.so \
380-
-e OCL_ICD_VENDORS=/dev/null \
381-
-L $GITHUB_WORKSPACE/build/lib \
382-
--timeout 00:10:00 \
383-
--verbose \
384-
-l $GITHUB_WORKSPACE/build/cts.log -f $GITHUB_WORKSPACE/build/cts.fail -r $GITHUB_WORKSPACE/build/cts_riscv_1svp.xml
392+
-r $GITHUB_WORKSPACE/build/cts_riscv_1svp.xml
385393
ninja -C $GITHUB_WORKSPACE/build check-ock-UnitCL-group-vecz
386394
387395
# Based on: mr-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release
@@ -458,9 +466,10 @@ jobs:
458466
run-ubuntu-gcc-x86_64-refsi-g1-wi-cl3-0:
459467
#if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_refsi_linux') }}
460468
if: ${{ contains(inputs.target_list, 'host_x86_64_linux') }}
461-
needs: [set_opencl_cts_path]
469+
needs: [set_env_vars]
462470
env:
463-
OPENCL_CTS_PATH: ${{ needs.set_opencl_cts_path.outputs.path_spec }}
471+
OPENCL_CTS_PATH: ${{ needs.set_env_vars.outputs.path_spec }}
472+
COMMON_RUN_CITIES_OPTIONS: ${{ needs.set_env_vars.outputs.run_cities_options }}
464473
# do not run as PR job for now to avoid flooding the concurrency
465474
runs-on: ubuntu-22.04
466475
container:
@@ -491,15 +500,9 @@ jobs:
491500
echo 'Subgroups,subgroups/test_subgroups barrier_functions_core' >> $GITHUB_WORKSPACE/skipped.txt
492501
set -x
493502
python3 $GITHUB_WORKSPACE/scripts/testing/run_cities.py \
494-
-s $GITHUB_WORKSPACE/scripts/jenkins/cts_summary/opencl_conformance_tests_wimpy_very_quick.csv \
503+
${{ env.COMMON_RUN_CITIES_OPTIONS }} \
495504
-i $GITHUB_WORKSPACE/skipped.txt \
496-
-b $GITHUB_WORKSPACE/test_conformance \
497-
-L $GITHUB_WORKSPACE/build/lib \
498-
-e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/build/lib/libCL.so \
499-
-e OCL_ICD_VENDORS=/dev/null \
500-
--timeout 00:10:00 \
501-
--verbose \
502-
-l $GITHUB_WORKSPACE/build/cts.log -f $GITHUB_WORKSPACE/build/cts.fail -r $GITHUB_WORKSPACE/build/cts_refsi_g1_wi.xml
505+
-r $GITHUB_WORKSPACE/build/cts_refsi_g1_wi.xml
503506
ninja -C build check-ock
504507
ninja -C build check-ock-UnitCL-half
505508

0 commit comments

Comments
 (0)