Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/opencl_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Linux OpenCL

on:
workflow_dispatch:

jobs:
build-linux:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4

# ===============================
# Restore OpenCL cache
# ===============================
- name: Restore OpenCL cache
id: opencl-cache
uses: actions/cache@v4
with:
path: opencl-install
key: opencl-${{ runner.os }}-1.1.1w

# ===============================
# Install build dependencies
# ===============================
- name: Install build dependencies
if: steps.openssl-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update

# ===============================
# Build OpenCL 3.0.19
# ===============================
- name: Build OpenCL 3.0.19
if: steps.opencl-cache.outputs.cache-hit != 'true'
run: |
echo "📥 Cloning OpenCL-SDK..."
git clone --depth 1 https://github.com/KhronosGroup/OpenCL-SDK.git
cd OpenCL-SDK

echo "🔄 Fetching tags..."
git fetch --all --tags
git checkout tags/v2025.07.23

echo "📦 Initializing submodules..."
git submodule init
git submodule update

echo "🏗️ Configuring OpenCL-SDK build..."
mkdir build
cd build

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DOPENCL_SDK_BUILD_SAMPLES=OFF \
-DOPENCL_SDK_TEST_SAMPLES=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \

echo "🔨 Building and installing OpenCL-SDK..."
sudo cmake --build . --target install

cd ../..

echo "🧹 Cleaning up OpenCL-SDK sources..."
sudo rm -rf OpenCL-SDK

echo "✅ OpenCL SDK 3.0.19 installed successfully"

# ===============================
# Upload artifact
# ===============================
- name: Upload OpenCL artifact
if: steps.opencl-cache.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: opencl-${{ runner.os }}-1.1.1w
path: opencl-install
Loading