Skip to content

Commit

Permalink
Switch over planned testing to use cp-ubuntu-24.04 for ock/OpenCL
Browse files Browse the repository at this point in the history
Switch ock artefact building and OpenCL building/running over to
cp-ubuntu-24.04.

Also enables windows for ock artefact building.
  • Loading branch information
coldav committed Jan 10, 2025
1 parent f5846d3 commit 5bb2a95
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 46 deletions.
4 changes: 4 additions & 0 deletions .github/actions/do_build_ock/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ runs:
$WINDOWSCLC = "${{ inputs.external_clc }}" -replace $PATTERN, '/'
echo "windowsclc is $WINDOWSCLC"
echo "windowsclc='$WINDOWSCLC'" >> $env:GITHUB_OUTPUT
ls $PWD
ls $PWD/llvm_install
ls $PWD/llvm_install/lib
- name: cmake_ock
shell: ${{ inputs.shell_to_use }}
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ runs:
llvm_version: ${{ inputs.llvm_version }}
llvm_build_type: RelAssert
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }}
os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }}

- name: build ock x86
if: steps.calc_vars.outputs.arch == 'x86_64'
Expand All @@ -41,6 +42,7 @@ runs:
build_targets: install
offline_kernel_tests: OFF
extra_flags: -DCA_ENABLE_TESTS=OFF -DCA_ENABLE_EXAMPLES=OFF -DCA_ENABLE_DOCUMENTATION=OFF
shell_to_use: ${{ contains(inputs.target, 'windows') && 'pwsh' || 'bash' }}

- name: build ock other ${{ matrix.target }}
if: steps.calc_vars.outputs.arch != 'x86_64'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
using: "composite"
steps:
- name: Install ubuntu prerequisites
if: ${{ inputs.os == 'ubuntu' }}
if: ${{ contains(inputs.os,'ubuntu') }}
shell: bash
run: |
# required for virtualenv running in docker
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'source/**'
- 'clik/**'
- 'modules/**'
- 'examples/**'
- 'cmake/**'
- 'hal/**'
- '.github/actions/do_build_ock/**'
- '.github/actions/setup_build/**'
- '.github/workflows/codeql.yml'
- 'CMakeLists.txt'
# pull_request:
# branches:
# - main
# paths:
# - 'source/**'
# - 'clik/**'
# - 'modules/**'
# - 'examples/**'
# - 'cmake/**'
# - 'hal/**'
# - '.github/actions/do_build_ock/**'
# - '.github/actions/setup_build/**'
# - '.github/workflows/codeql.yml'
# - 'CMakeLists.txt'
schedule:
- cron: '19 9 * * 3'

Expand Down
60 changes: 49 additions & 11 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,40 @@ jobs:
cat $GITHUB_OUTPUT
create_ock_artefacts:
create_ock_artefacts_windows:
needs: [workflow_vars]
# Currently there is only one windows target so we don't bother with the
# matrix, just check if it's enabled
runs-on: windows-2019
if : inputs.ock && contains(inputs.target_list, 'host_x86_64_windows')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Windows llvm base
uses: llvm/actions/setup-windows@main
with:
arch: amd64
- name: build ock artefact
uses: ./.github/actions/do_build_ock_artefact
with:
target: host_x86_64_windows
llvm_version: ${{ inputs.llvm_version }}

create_ock_artefacts_ubuntu:
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

# risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we
# build llvm. Otherwise we choose windows or ubuntu-22.04 depending on the
# target.
runs-on: ${{ (contains(matrix.target, 'host_riscv') && 'ubuntu-24.04') || (contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' ) }}
if : inputs.ock
# build llvm. Otherwise we choose ubuntu-22.04 (use a container for both for consistency).
runs-on: cp-ubuntu-24.04
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/intel/llvm/ubuntu2404_base:latest' || 'ghcr.io/intel/llvm/ubuntu2204_base:latest' }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
if : inputs.ock && contains(inputs.target_list, 'linux')
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -97,7 +119,7 @@ jobs:
# Currently only builds and runs on x86_64 linux
build_run_tornado:
if: inputs.test_tornado
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
needs: [ workflow_vars, build_icd, create_ock_artefacts_ubuntu ]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
Expand Down Expand Up @@ -125,14 +147,18 @@ jobs:
# Currently only builds and runs (default: quick) on x86_64 linux
build_run_opencl_cts:
if: inputs.test_opencl_cts
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
needs: [ workflow_vars, build_icd, create_ock_artefacts_ubuntu ]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

# TODO: host-x86_64-linux only - expand for other targets
runs-on: ubuntu-22.04
runs-on: cp-ubuntu-24.04
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/intel/llvm/ubuntu2404_base:latest' || 'ghcr.io/intel/llvm/ubuntu2204_base:latest' }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: clone ock
uses: actions/checkout@v4
Expand Down Expand Up @@ -160,7 +186,13 @@ jobs:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: ${{ contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' }}
# TODO: Extend if we decide to enable for windows or build natively on another target
runs-on: cp-ubuntu-24.04
container:
image: ghcr.io/intel/llvm/ubuntu2204_base:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}

if : inputs.test_sycl_cts
steps:
- name: Checkout repo
Expand All @@ -178,7 +210,13 @@ jobs:
# TODO: For now just linux x86_64
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: 'ubuntu-22.04'
# TODO: Extend if we decide to enable for windows or build natively on another target
runs-on: cp-ubuntu-24.04
container:
image: ghcr.io/intel/llvm/ubuntu2204_base:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}

if : inputs.test_sycl_cts
steps:
- name: Checkout repo
Expand All @@ -189,7 +227,7 @@ jobs:
target: ${{ matrix.target }}

run_sycl_cts:
needs: [workflow_vars, create_ock_artefacts, build_dpcpp_native_host, build_sycl_cts]
needs: [workflow_vars, create_ock_artefacts_ubuntu, build_dpcpp_native_host, build_sycl_cts]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
name: Run planned testing
on:
# Note: use pull_request: for localized testing only
#pull_request:
# paths:
# - '.github/workflows/planned_testing.yml'
# - '.github/workflows/planned_testing_caller.yml'
# branches:
# - main
pull_request:
paths:
- '.github/workflows/planned_testing.yml'
- '.github/workflows/planned_testing_caller.yml'
branches:
- main
schedule:
# Run Mon-Fri at 7pm
- cron: '00 19 * * 1-5'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
call_planned:
# This makes the diagram too big if we post much here so S_ for scheduled.
Expand All @@ -20,9 +24,11 @@ jobs:
uses: ./.github/workflows/planned_testing.yml
with:
target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]'
# target_list: '["host_x86_64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]'
# target_list: '["host_x86_64_windows" ]'
ock: true
test_tornado: true
test_sycl_cts: true
test_sycl_cts: false
test_opencl_cts: true
# Have a pull request setting which can be used to test the flow as best as possible
# in a reasonable time
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/run_pr_tests_caller.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Calling workflow for running PR style tests
name: Run ock tests for PR style testing
on:
pull_request:
paths:
- 'source/**'
- 'clik/**'
- 'modules/**'
- 'examples/**'
- 'cmake/**'
- 'hal/**'
- '.github/actions/do_build_ock/**'
- '.github/actions/setup_build/**'
- '.github/workflows/run_pr_tests.yml'
- '.github/workflows/run_pr_tests_caller.yml'
- 'CMakeLists.txt'
# pull_request:
# paths:
# - 'source/**'
# - 'clik/**'
# - 'modules/**'
# - 'examples/**'
# - 'cmake/**'
# - 'hal/**'
# - '.github/actions/do_build_ock/**'
# - '.github/actions/setup_build/**'
# - '.github/workflows/run_pr_tests.yml'
# - '.github/workflows/run_pr_tests_caller.yml'
# - 'CMakeLists.txt'
schedule:
# Run Mon-Fri at 7pm
- cron: '00 19 * * 1-5'
Expand Down

0 comments on commit 5bb2a95

Please sign in to comment.