Skip to content

Commit

Permalink
Add test unitcl using ock artefact
Browse files Browse the repository at this point in the history
  • Loading branch information
coldav committed Dec 11, 2024
1 parent 39f6c34 commit 1c8cdb1
Show file tree
Hide file tree
Showing 5 changed files with 636 additions and 11 deletions.
18 changes: 13 additions & 5 deletions .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inputs:
default: '19'
target:
description: 'target architecture'
create_ock_artefact_method:
description: 'method of creating ock artefact - build,<run_id>'
default: "build"

# TODO: This has not been tested yet on windows so would likely need some updating.
runs:
Expand All @@ -35,15 +38,15 @@ runs:
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }}

- name: build ock x86
if: steps.calc_vars.outputs.arch == 'x86_64'
if: steps.calc_vars.outputs.arch == 'x86_64' && inputs.create_ock_artefact_method == 'build'
uses: ./.github/actions/do_build_ock
with:
build_targets: install
offline_kernel_tests: OFF
extra_flags: -DCA_ENABLE_TESTS=OFF -DCA_ENABLE_EXAMPLES=OFF -DCA_ENABLE_DOCUMENTATION=OFF

- name: build ock other ${{ matrix.target }}
if: steps.calc_vars.outputs.arch != 'x86_64'
if: steps.calc_vars.outputs.arch != 'x86_64' && inputs.create_ock_artefact_method == 'build'
uses: ./.github/actions/do_build_ock
with:
build_targets: install
Expand All @@ -52,6 +55,11 @@ runs:
# Do we need the offline kernel as an artefact? If so currently this requires an external clc or qemu to be installed.
offline_kernel_tests: OFF
host_fp16: ON
- name: download previous ock
if: inputs.create_ock_artefact_method != 'build'
run: |
gh run download ${{ inputs.create_ock_artefact_method }} -n ock_${{ inputs.target }} -D install
ls install
# Prune it as there is too much things in there we don't want to use
# Todo: move this logic to cmake settings so that we build only what we
Expand All @@ -60,12 +68,12 @@ runs:
shell: bash
run: |
# delete all but clc, city runner and the python associated file under bin
find install/bin -maxdepth 1 -type f -and ! \( -name "*.py" -o -name "*clc" \) -delete
rm -rf install/share
find install/bin -maxdepth 1 -type f -and ! \( -name "*.py" -o -name "*clc" -o "*UnitCL*" \) -delete
# rm -rf install/share
- name: upload ock artefact
uses: actions/upload-artifact@v4
with:
name: ock_${{ inputs.target }}
path: install
retention-days: 1
retention-days: 3
Loading

0 comments on commit 1c8cdb1

Please sign in to comment.