Skip to content

Commit 29bf8ef

Browse files
First
1 parent ec3b102 commit 29bf8ef

File tree

1 file changed

+26
-167
lines changed

1 file changed

+26
-167
lines changed

.github/workflows/planned_testing.yml

Lines changed: 26 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -35,173 +35,32 @@ jobs:
3535

3636
# Calculate some useful variables that can be used through the workflow
3737
# Currently this can be used to exclude all but certain targets in matrices
38-
workflow_vars:
38+
alan:
3939
runs-on: ubuntu-22.04
40-
outputs:
41-
matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }}
42-
matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
4340
steps:
44-
- id: vars
45-
# TODO: If we expand on this, come up with a more programmatical way of doing only certain targets.
46-
# These variables are for excluding certain targets from the total list, which is why just including
47-
# two targets is a long list of excludes
48-
run: |
49-
echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
50-
echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT
51-
cat $GITHUB_OUTPUT
52-
53-
54-
create_ock_artefacts:
55-
needs: [workflow_vars]
56-
strategy:
57-
matrix:
58-
target: ${{ fromJson(inputs.target_list) }}
59-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
60-
61-
# risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we
62-
# build llvm. Otherwise we choose windows or ubuntu-22.04 depending on the
63-
# target.
64-
runs-on: ${{ (contains(matrix.target, 'host_riscv') && 'ubuntu-24.04') || (contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' ) }}
65-
if : inputs.ock
66-
steps:
67-
- name: Checkout repo
68-
uses: actions/checkout@v4
69-
- name: build ock artefact
70-
uses: ./.github/actions/do_build_ock_artefact
71-
with:
72-
target: ${{ matrix.target }}
73-
llvm_version: ${{ inputs.llvm_version }}
74-
75-
build_icd:
76-
if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts
77-
needs: [workflow_vars]
78-
strategy:
79-
matrix:
80-
target: ${{ fromJson(inputs.target_list) }}
81-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}
82-
83-
runs-on: ubuntu-22.04
84-
steps:
85-
- name: clone ock platform
86-
uses: actions/checkout@v4
87-
with:
88-
sparse-checkout: |
89-
platform
90-
.github
91-
- name : build and upload icd ${{matrix.target}}
92-
uses: ./.github/actions/do_build_icd
93-
with:
94-
target: ${{matrix.target}}
95-
96-
97-
# Currently only builds and runs on x86_64 linux
98-
build_run_tornado:
99-
if: inputs.test_tornado
100-
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
101-
strategy:
102-
matrix:
103-
target: ${{ fromJson(inputs.target_list) }}
104-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
105-
106-
# Todo: expand for aarch64
107-
runs-on: ubuntu-22.04
108-
steps:
109-
- name: clone ock platform
110-
uses: actions/checkout@v4
111-
with:
112-
sparse-checkout: |
113-
platform
114-
.github
115-
# TODO: Consider separating out tornado build and run in the future
116-
- name : build and upload tornado
117-
uses: ./.github/actions/do_build_tornado
118-
with:
119-
target: ${{ matrix.target }}
120-
- name : run tornado
121-
uses: ./.github/actions/run_tornado
122-
with:
123-
target: ${{ matrix.target }}
124-
125-
# Currently only builds and runs (default: quick) on x86_64 linux
126-
build_run_opencl_cts:
127-
if: inputs.test_opencl_cts
128-
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
129-
strategy:
130-
matrix:
131-
target: ${{ fromJson(inputs.target_list) }}
132-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
133-
134-
# TODO: host-x86_64-linux only - expand for other targets
135-
runs-on: ubuntu-22.04
136-
steps:
137-
- name: clone ock
138-
uses: actions/checkout@v4
139-
with:
140-
# scripts: for run_cities.py
141-
# source: for CTS filter.csv files
142-
sparse-checkout: |
143-
scripts
144-
source
145-
.github
146-
# TODO: Consider separating out opencl_cts build and run in the future
147-
- name : build and upload opencl_cts
148-
uses: ./.github/actions/do_build_opencl_cts
149-
with:
150-
target: ${{ matrix.target }}
151-
- name : run opencl_cts
152-
uses: ./.github/actions/run_opencl_cts
153-
with:
154-
target: ${{ matrix.target }}
155-
156-
build_dpcpp_native_host:
157-
needs: [workflow_vars]
158-
strategy:
159-
matrix:
160-
target: ${{ fromJson(inputs.target_list) }}
161-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
162-
163-
runs-on: ${{ contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' }}
164-
if : inputs.test_sycl_cts
165-
steps:
166-
- name: Checkout repo
167-
uses: actions/checkout@v4
168-
- name: build dpc++ artefact
169-
uses: ./.github/actions/do_build_dpcpp
170-
with:
171-
target: ${{ matrix.target }}
172-
173-
build_sycl_cts:
174-
needs: [workflow_vars, build_icd, build_dpcpp_native_host]
175-
strategy:
176-
matrix:
177-
target: ${{ fromJson(inputs.target_list) }}
178-
# TODO: For now just linux x86_64
179-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
180-
181-
runs-on: 'ubuntu-22.04'
182-
if : inputs.test_sycl_cts
183-
steps:
184-
- name: Checkout repo
185-
uses: actions/checkout@v4
186-
- name: build dpc++ artefact
187-
uses: ./.github/actions/do_build_sycl_cts
188-
with:
189-
target: ${{ matrix.target }}
190-
191-
run_sycl_cts:
192-
needs: [workflow_vars, create_ock_artefacts, build_dpcpp_native_host, build_sycl_cts]
193-
strategy:
194-
matrix:
195-
target: ${{ fromJson(inputs.target_list) }}
196-
# TODO: For now just linux x86_64
197-
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}
198-
199-
runs-on: 'ubuntu-22.04'
200-
if : inputs.test_sycl_cts
201-
steps:
202-
- name: Checkout repo
203-
uses: actions/checkout@v4
204-
- name: build dpc++ artefact
205-
uses: ./.github/actions/run_sycl_cts
41+
- name: Download ock artefact
42+
uses: actions/download-artifact@v4
20643
with:
207-
target: ${{ matrix.target }}
44+
name: ock_${{inputs.target}}
45+
path: install_ock
46+
47+
- name: Run opencl cts
48+
shell: bash
49+
env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv
50+
# TODO: host-x86_64-linux filter - expand for other targets
51+
CTS_FILTER: cts-3.0-online-ignore-linux-host.csv
52+
CTS_TIMEOUT: 18:00:00 # OK for github?
53+
run: |
54+
cd "$GITHUB_WORKSPACE/OpenCL-CTS"
55+
echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER"
56+
set -x
57+
echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \
58+
--color=always --timeout $CTS_TIMEOUT \
59+
-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \
60+
-b "$GITHUB_WORKSPACE/test_conformance" \
61+
-L "$GITHUB_WORKSPACE/install_icd/lib" \
62+
-e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \
63+
-e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \
64+
-e "CL_PLATFORM_INDEX=0" \
65+
-s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \
66+
-i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER"

0 commit comments

Comments
 (0)