Skip to content

Commit

Permalink
First
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp committed Dec 19, 2024
1 parent ec3b102 commit edfd8fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 148 deletions.
142 changes: 0 additions & 142 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,95 +33,6 @@ on:

jobs:

# Calculate some useful variables that can be used through the workflow
# Currently this can be used to exclude all but certain targets in matrices
workflow_vars:
runs-on: ubuntu-22.04
outputs:
matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }}
matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }}
steps:
- id: vars
# TODO: If we expand on this, come up with a more programmatical way of doing only certain targets.
# These variables are for excluding certain targets from the total list, which is why just including
# two targets is a long list of excludes
run: |
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
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
cat $GITHUB_OUTPUT
create_ock_artefacts:
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
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build ock artefact
uses: ./.github/actions/do_build_ock_artefact
with:
target: ${{ matrix.target }}
llvm_version: ${{ inputs.llvm_version }}

build_icd:
if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
- name : build and upload icd ${{matrix.target}}
uses: ./.github/actions/do_build_icd
with:
target: ${{matrix.target}}


# Currently only builds and runs on x86_64 linux
build_run_tornado:
if: inputs.test_tornado
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

# Todo: expand for aarch64
runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
# TODO: Consider separating out tornado build and run in the future
- name : build and upload tornado
uses: ./.github/actions/do_build_tornado
with:
target: ${{ matrix.target }}
- name : run tornado
uses: ./.github/actions/run_tornado
with:
target: ${{ matrix.target }}

# Currently only builds and runs (default: quick) on x86_64 linux
build_run_opencl_cts:
if: inputs.test_opencl_cts
Expand Down Expand Up @@ -152,56 +63,3 @@ jobs:
uses: ./.github/actions/run_opencl_cts
with:
target: ${{ matrix.target }}

build_dpcpp_native_host:
needs: [workflow_vars]
strategy:
matrix:
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' }}
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/do_build_dpcpp
with:
target: ${{ matrix.target }}

build_sycl_cts:
needs: [workflow_vars, build_icd, build_dpcpp_native_host]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
# TODO: For now just linux x86_64
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: 'ubuntu-22.04'
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/do_build_sycl_cts
with:
target: ${{ matrix.target }}

run_sycl_cts:
needs: [workflow_vars, create_ock_artefacts, build_dpcpp_native_host, build_sycl_cts]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
# TODO: For now just linux x86_64
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: 'ubuntu-22.04'
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/run_sycl_cts
with:
target: ${{ matrix.target }}
12 changes: 6 additions & 6 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
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'
Expand Down

0 comments on commit edfd8fc

Please sign in to comment.