Skip to content

Commit

Permalink
Add ock artefact building
Browse files Browse the repository at this point in the history
  • Loading branch information
coldav committed Oct 25, 2024
1 parent 6c02bae commit 894ab76
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
# pull_request:
# branches:
# - main
schedule:
- cron: '19 9 * * 3'

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Simple workflow for running non-documentation PR testing
name: Run ock tests for PR testing
on:
workflow_call:
inputs:
ock:
required: false
type: boolean
default: true
target_list:
required: false
type: string
default: '["x86_64", "aarch64", "riscv64"]'
os_list:
required: false
type: string
default: '["ubuntu-22.04", "windows-2019"]'
# target_host_x86_64_windows:
# required: false
# type: boolean
# default: false
# target_host_aarch64_linux:
# required: false
# type: boolean
# default: true
llvm_version:
required: false
type: string
default: 18

jobs:

calc_matrix:
runs-on: ubuntu-latest
name: Calc matrix
outputs:
target_list: ${{ steps.step1.outputs.target_list }}
os_list: ${{ steps.step1.outputs.os_list }}
steps:
- uses: actions/checkout@v3
- id: step1
run: |
echo "target_list=${{ inputs.target_list }}" >> "$GITHUB_OUTPUT"
echo "os_list=${{ inputs.os_list }}" >> "$GITHUB_OUTPUT"
create_ock_artefacts:
needs: calc_matrix
strategy:
matrix:
arch: ${{ fromJson(needs.calc_matrix.outputs.target_list) }}
os: ${{ fromJson(needs.calc_matrix.outputs.os_list) }}
build_type: [RelAssert]

runs-on: ${{ matrix.os }}
steps:
- name: Build ock (pretend)
# if: ${{ contains(inputs.target_linux.matrix.arch, matrix.arch) }}
run:
echo Running for ${{ matrix.arch }} on os ${{ matrix.os}} input is ${{ inputs.target_linux }})

# echo "${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.arch }}" > foo.txt

# --define CA_CL_ENABLE_ICD_LOADER=ON
# --define OCL_EXTENSION_cl_khr_command_buffer=ON
# --define OCL_EXTENSION_cl_khr_command_buffer_mutable_dispatch=ON
# --define OCL_EXTENSION_cl_khr_extended_async_copies=ON
# --target check-ock
# -B build
29 changes: 29 additions & 0 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Calling workflow for running PR style tests
name: Run ock tests for PR style testing
on:
pull_request:
paths:
- '.github/workflows/planned_testing.yml'
# schedule:
# # Run Mon-Fri at 7pm
# - cron: '00 19 * * 1-5'

jobs:
run-with-pull:
name: Call PR testing on pull request
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/planned_testing.yml
with:
target_list: '["x86_64"]'
os_list: '["ubuntu-22.04"]'
# target_host_aarch64_linux: true

# # Could have multiple here
# run-with-cron:
# name: Call PR testing on schedule
# if: ${{ github.event_name == 'schedule' }}
# uses: ./.github/workflows/run_pr_tests.yml
# with:
# update_cache: true

# additional ones here for cron and/or push to main - also can be in different file.

0 comments on commit 894ab76

Please sign in to comment.