Skip to content

Commit

Permalink
TBD icd
Browse files Browse the repository at this point in the history
  • Loading branch information
coldav committed Nov 13, 2024
1 parent 769c8a4 commit 7f9bf45
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 85 deletions.
106 changes: 106 additions & 0 deletions .github/actions/do_build_icd/action.yml
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
Loading

0 comments on commit 7f9bf45

Please sign in to comment.