-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
359 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: calc vars | ||
description: calc vars | ||
|
||
inputs: | ||
target: | ||
description: 'TBD' | ||
default: host_x86 | ||
|
||
outputs: | ||
arch: | ||
value: ${{ steps.calc_vars_action.outputs.arch }} | ||
toolchain: | ||
value: ${{ steps.calc_vars_action.outputs.toolchain }} | ||
runs: | ||
# We don't want a new docker just a list of steps, so mark as composite | ||
using: "composite" | ||
steps: | ||
# - | ||
- shell: bash | ||
id: calc_vars_action | ||
run: | | ||
if [[ "${{inputs.target}}" = "host_x86_64_linux" ]]; then | ||
echo "arch=x86_64" >> $GITHUB_OUTPUT | ||
echo "toolchain=" >> $GITHUB_OUTPUT | ||
elif [[ "${{inputs.target}}" = "host_x86_64_windows" ]]; then | ||
echo "arch=x86_64" >> $GITHUB_OUTPUT | ||
echo "toolchain=" >> $GITHUB_OUTPUT | ||
elif [[ "${{inputs.target}}" = "host_aarch64_linux" ]]; then | ||
echo "arch=aarch64" >> $GITHUB_OUTPUT; | ||
echo "toolchain=$GITHUB_WORKSPACE/platform/arm-linux/aarch64-toolchain.cmake" >> $GITHUB_OUTPUT | ||
elif [[ "${{inputs.target}}" = "host_riscv64_linux" ]]; then | ||
echo "arch=riscv64" >> $GITHUB_OUTPUT; | ||
echo "toolchain=$GITHUB_WORKSPACE/platform/riscv64-linux/riscv64-toolchain.cmake" >> $GITHUB_OUTPUT | ||
else | ||
echo Unknown target ${{inputs.target}} | ||
exit 1 | ||
fi | ||
cat $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: build-ock-artefacts | ||
description: Action to build the oneapi-construction-kit as an artefact | ||
|
||
inputs: | ||
artefact_name: | ||
description: 'TBD' | ||
llvm_version: | ||
description: 'TBD' | ||
default: '19' | ||
|
||
# TODO: This has not been tested yet on windows so would likely need some updating. | ||
runs: | ||
# We don't want a new docker just a list of steps, so mark as composite | ||
using: "composite" | ||
steps: | ||
- name: calc vars | ||
id: calc_vars | ||
uses: ./.github/actions/calc_vars | ||
with: | ||
target: ${{ inputs.target }} | ||
|
||
- name: print vars | ||
shell: bash | ||
run: | | ||
echo arch = ${{steps.calc_vars.outputs.arch}} | ||
echo toolchain = ${{steps.calc_vars.outputs.toolchain}} | ||
# installs tools, ninja, installs llvm and sets up sccache | ||
- name: setup | ||
uses: ./.github/actions/setup_build | ||
with: | ||
llvm_version: 19 | ||
llvm_build_type: RelAssert | ||
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && '' || steps.calc_vars.outputs.arch }} | ||
native_llvm_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && '' || 'x86_64' }} | ||
|
||
- name: build ock x86 | ||
if: steps.calc_vars.outputs.arch == 'x86_64' | ||
uses: ./.github/actions/do_build_ock | ||
with: | ||
build_targets: install | ||
offline_kernel_tests: OFF | ||
|
||
- name: build ock other ${{ matrix.target }} | ||
if: steps.calc_vars.outputs.arch != 'x86_64' | ||
uses: ./.github/actions/do_build_ock | ||
with: | ||
build_targets: install | ||
# Todo : target does not directly equate to arch here | ||
toolchain_file: ${{ steps.calc_vars.outputs.toolchain }} | ||
extra_flags: -DCA_BUILTINS_TOOLS_DIR=${{ github.workspace }}/llvm_install_native/bin | ||
# 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 | ||
|
||
# Prune it as there is too much things in there we don't want to use | ||
# We may want to extend this a bit as time goes on such as clc or UnitCL | ||
- name: prune ock artefact | ||
shell: bash | ||
run: | | ||
# delete all but city runner and the python associated file under bin | ||
find install/bin -maxdepth 1 -type f ! -name "*.py" -delete | ||
rm -rf install/share | ||
- name: upload ock artefact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ock_${{ inputs.target }} | ||
path: install | ||
retention-days: 1 | ||
|
||
# Some of these are riscv or host target specific, but it does not harm at present to | ||
# overset cmake values | ||
# inputs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.