-
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
4 changed files
with
312 additions
and
85 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,106 @@ | ||
name: pull and build icd loader | ||
description: pull icd loader and build with a particular toolchain | ||
|
||
inputs: | ||
toolchain: | ||
description: 'path to toolchain' | ||
default: '' | ||
#$GITHUB_WORKSPACE/ock/platform/x86_64-linux.cmake | ||
build_type: | ||
description: 'build type' | ||
default: Release | ||
name: | ||
description: 'artifact name' | ||
default: ubuntu-22.04-x86_64 | ||
shell_to_use: | ||
description: "which shell to use (default bash)" | ||
default: bash | ||
|
||
runs: | ||
# We don't want a new docker just a list of steps, so mark as composite | ||
using: "composite" | ||
steps: | ||
# - name: clone ock platform | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# sparse-checkout: | | ||
# platform | ||
# path: ock | ||
|
||
- name: check paths | ||
shell: ${{ inputs.shell_to_use }} | ||
run: | | ||
pwd | ||
ls -d * | ||
- name: clone headers | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: KhronosGroup/OpenCL-Headers | ||
path: headers | ||
- name: build headers | ||
shell: ${{ inputs.shell_to_use }} | ||
run: | | ||
pwd | ||
ls -d * | ||
cmake headers -Bheaders/build ${{ inputs.toolchain }} -DCMAKE_INSTALL_PREFIX=$PWD/headers_install -GNinja | ||
ninja -v -C headers/build | ||
ninja -v -C headers/build install | ||
- name: clone icd | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: KhronosGroup/OpenCL-ICD-Loader | ||
path: icd | ||
|
||
- name: icd cmake | ||
shell: ${{ inputs.shell_to_use }} | ||
run: | ||
cmake icd -B icd/build ${{ inputs.toolchain }} | ||
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DCMAKE_INSTALL_PREFIX=$PWD/install_icd | ||
-DOpenCLHeaders_DIR=$PWD/headers_install/share/cmake/OpenCLHeaders -GNinja | ||
|
||
- name: icd build | ||
shell: ${{ inputs.shell_to_use }} | ||
run: | | ||
ninja -v -C icd/build | ||
ninja -v -C icd/build install | ||
pwd | ||
ls icd/ | ||
- name: upload icd artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: install_icd | ||
retention-days: 1 | ||
|
||
# - name: cmake_ock | ||
# shell: ${{ inputs.shell_to_use }} | ||
# - mkdir -p $CI_PROJECT_DIR/build | ||
# - cd $CI_PROJECT_DIR/build | ||
# - git -c advice.detachedHead=false | ||
# clone https://github.com/KhronosGroup/OpenCL-Headers | ||
# --single-branch --depth 1 | ||
# - cd OpenCL-Headers | ||
# - git log -1 | ||
# - mkdir build | ||
# - cmake -Bbuild ${{ inputs.toolchain }} . | ||
# "-DCMAKE_INSTALL_PREFIX=$OPENCL_HEADERS_PATH" -GNinja | ||
# - ninja -v -C build | ||
# - ninja -v -C build install | ||
# - cd .. | ||
|
||
# - git -c advice.detachedHead=false | ||
# clone https://github.com/KhronosGroup/OpenCL-ICD-Loader | ||
# --single-branch --depth 1 | ||
# - cd OpenCL-ICD-Loader | ||
# - git log -1 | ||
# - mkdir build | ||
# - cmake -Bbuild . ${{ inputs.toolchain }} | ||
# "-DCMAKE_BUILD_TYPE=$ICD_BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=$ICD_LOADER_INSTALL_PATH | ||
# "-DOpenCLHeaders_DIR=$OPENCL_HEADERS_PATH/share/cmake/OpenCLHeaders" -GNinja | ||
# - ninja -v -C build | ||
# - ninja -v -C build install | ||
# - cd $CI_PROJECT_DIR |
Oops, something went wrong.