Skip to content

Commit e8c07d3

Browse files
workflow OpenCL
1 parent 8334922 commit e8c07d3

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/opencl_linux.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Linux OpenCL
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-linux:
8+
runs-on: ubuntu-22.04
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
# ===============================
15+
# Restore OpenCL cache
16+
# ===============================
17+
- name: Restore OpenCL cache
18+
id: opencl-cache
19+
uses: actions/cache@v4
20+
with:
21+
path: opencl-install
22+
key: opencl-${{ runner.os }}-1.1.1w
23+
24+
# ===============================
25+
# Install build dependencies
26+
# ===============================
27+
- name: Install build dependencies
28+
if: steps.openssl-cache.outputs.cache-hit != 'true'
29+
run: |
30+
sudo apt-get update
31+
32+
# ===============================
33+
# Build OpenCL 3.0.19
34+
# ===============================
35+
- name: Build OpenCL 3.0.19
36+
if: steps.opencl-cache.outputs.cache-hit != 'true'
37+
run: |
38+
echo "📥 Cloning OpenCL-SDK..."
39+
git clone --depth 1 https://github.com/KhronosGroup/OpenCL-SDK.git
40+
cd OpenCL-SDK
41+
42+
echo "🔄 Fetching tags..."
43+
git fetch --all --tags
44+
git checkout tags/v2025.07.23
45+
46+
echo "📦 Initializing submodules..."
47+
git submodule init
48+
git submodule update
49+
50+
echo "🏗️ Configuring OpenCL-SDK build..."
51+
mkdir build
52+
cd build
53+
54+
cmake .. \
55+
-DCMAKE_BUILD_TYPE=Release \
56+
-DBUILD_TESTING=OFF \
57+
-DBUILD_DOCS=OFF \
58+
-DBUILD_EXAMPLES=OFF \
59+
-DBUILD_TESTS=OFF \
60+
-DOPENCL_SDK_BUILD_SAMPLES=OFF \
61+
-DOPENCL_SDK_TEST_SAMPLES=OFF \
62+
-DCMAKE_INSTALL_PREFIX=/usr/local \
63+
64+
echo "🔨 Building and installing OpenCL-SDK..."
65+
sudo cmake --build . --target install
66+
67+
cd ../..
68+
69+
echo "🧹 Cleaning up OpenCL-SDK sources..."
70+
sudo rm -rf OpenCL-SDK
71+
72+
echo "✅ OpenCL SDK 3.0.19 installed successfully"
73+
74+
# ===============================
75+
# Upload artifact
76+
# ===============================
77+
- name: Upload OpenCL artifact
78+
if: steps.opencl-cache.outputs.cache-hit != 'true'
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: opencl-${{ runner.os }}-1.1.1w
82+
path: opencl-install

0 commit comments

Comments
 (0)