Skip to content

Commit 8b8d2f1

Browse files
committed
test
Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
1 parent cd15588 commit 8b8d2f1

6 files changed

Lines changed: 277 additions & 0 deletions

File tree

.github/workflows/sycl-linux-precommit.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,14 @@ jobs:
302302
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
303303
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
304304
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
305+
blender:
306+
needs: [build, detect_changes]
307+
permissions:
308+
contents: write
309+
packages: read
310+
if: |
311+
!cancelled()
312+
&& needs.build.outputs.build_conclusion == 'success'
313+
uses: ./devops/devops/blender/action.yml
314+
with:
315+

devops/actions/blender/action.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: 'Blender with Intel GPU/SYCL'
2+
description: 'Build OIDN, Embree, and Blender with Intel GPU/SYCL support, then run classroom demo'
3+
4+
inputs:
5+
workspace:
6+
description: 'Workspace directory for builds'
7+
required: false
8+
default: '${{ github.workspace }}'
9+
c_compiler:
10+
description: 'Path to C compiler'
11+
required: true
12+
cxx_compiler:
13+
description: 'Path to C++ compiler'
14+
required: true
15+
16+
runs:
17+
using: "composite"
18+
steps:
19+
- name: Build OIDN
20+
uses: ./devops/actions/blender/oidn
21+
with:
22+
cmake_install_prefix: ${{ format('{0}/oidn-install', inputs.workspace) }}
23+
c_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang
24+
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
25+
26+
# - name: Build Embree
27+
# uses: ./devops/actions/blender/embree
28+
# with:
29+
# cmake_install_prefix: ${{ format('{0}/embree-install', inputs.workspace) }}
30+
# c_compiler: ${{ inputs.c_compiler }}
31+
# cxx_compiler: ${{ inputs.cxx_compiler }}
32+
33+
# - name: Build Blender
34+
# uses: ./devops/actions/blender/blender-build
35+
# with:
36+
# oidn_dir: ${{ format('{0}/oidn-install', inputs.workspace) }}
37+
# embree_dir: ${{ format('{0}/embree-install', inputs.workspace) }}
38+
# cmake_install_prefix: ${{ format('{0}/blender-install', inputs.workspace) }}
39+
# c_compiler: ${{ inputs.c_compiler }}
40+
# cxx_compiler: ${{ inputs.cxx_compiler }}
41+
42+
# - name: Run Blender Classroom Demo
43+
# uses: ./devops/actions/blender/blender-demo
44+
# with:
45+
# blender_dir: ${{ format('{0}/blender-install', inputs.workspace) }}
46+
# oidn_dir: ${{ format('{0}/oidn-install', inputs.workspace) }}
47+
# embree_dir: ${{ format('{0}/embree-install', inputs.workspace) }}
48+
# output_dir: ${{ format('{0}/blender-output', inputs.workspace) }}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Build Blender'
2+
description: 'Clone and build Blender with Intel GPU/SYCL support'
3+
4+
inputs:
5+
oidn_dir:
6+
description: 'OIDN installation directory'
7+
required: true
8+
embree_dir:
9+
description: 'Embree installation directory'
10+
required: true
11+
cmake_install_prefix:
12+
description: 'CMAKE_INSTALL_PREFIX for Blender build'
13+
required: false
14+
default: '${{ github.workspace }}/blender-install'
15+
cache_path:
16+
description: 'Path to cache location for repos'
17+
required: false
18+
default: '${{ github.workspace }}/cache'
19+
c_compiler:
20+
description: 'Path to C compiler'
21+
required: true
22+
cxx_compiler:
23+
description: 'Path to C++ compiler'
24+
required: true
25+
26+
runs:
27+
using: "composite"
28+
steps:
29+
- name: Checkout Blender
30+
uses: ./devops/actions/cached_checkout
31+
with:
32+
repository: 'blender/blender'
33+
path: 'blender-src'
34+
cache_path: "/__w/repo_cache/"
35+
36+
- name: Update Blender Dependencies
37+
shell: bash
38+
run: |
39+
cd blender-src
40+
git submodule update --init --recursive
41+
make update
42+
43+
- name: Configure Blender
44+
shell: bash
45+
run: |
46+
cmake -GNinja -B blender-build -S blender-src \
47+
-DCMAKE_BUILD_TYPE=Release \
48+
-DCMAKE_INSTALL_PREFIX="${{ inputs.cmake_install_prefix }}" \
49+
-DCMAKE_C_COMPILER="${{ inputs.c_compiler }}" \
50+
-DCMAKE_CXX_COMPILER="${{ inputs.cxx_compiler }}" \
51+
-DWITH_CYCLES_DEVICE_ONEAPI=ON \
52+
-DOIDN_ROOT_DIR=${{ inputs.oidn_dir }} \
53+
-DEMBREE_ROOT_DIR=${{ inputs.embree_dir }} \
54+
-DWITH_CYCLES_EMBREE=ON \
55+
-DWITH_OPENIMAGEDENOISE=ON
56+
57+
- name: Build Blender
58+
shell: bash
59+
run: cmake --build blender-build --config Release
60+
61+
- name: Install Blender
62+
shell: bash
63+
run: cmake --install blender-build --config Release
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: 'Run Blender Classroom Demo'
2+
description: 'Download and render the Blender Classroom demo scene with Intel GPU'
3+
4+
inputs:
5+
blender_dir:
6+
description: 'Blender installation directory'
7+
required: true
8+
oidn_dir:
9+
description: 'OIDN installation directory'
10+
required: true
11+
embree_dir:
12+
description: 'Embree installation directory'
13+
required: true
14+
output_dir:
15+
description: 'Output directory for rendered images'
16+
required: false
17+
default: '${{ github.workspace }}/blender-output'
18+
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Download Classroom Demo
23+
shell: bash
24+
run: |
25+
mkdir -p classroom-demo
26+
cd classroom-demo
27+
curl -L -o classroom.blend.zip https://download.blender.org/demo/test/classroom.zip
28+
unzip classroom.blend.zip
29+
30+
- name: Setup Environment
31+
shell: bash
32+
run: |
33+
echo "${{ inputs.oidn_dir }}/bin" >> $GITHUB_PATH
34+
echo "${{ inputs.embree_dir }}/bin" >> $GITHUB_PATH
35+
echo "${{ inputs.blender_dir }}/bin" >> $GITHUB_PATH
36+
37+
- name: Render Classroom Scene
38+
shell: bash
39+
run: |
40+
mkdir -p ${{ inputs.output_dir }}
41+
cd classroom-demo
42+
blender -b classroom.blend -o ${{ inputs.output_dir }}/frame_#### -f 1 -- --cycles-device ONEAPI
43+
44+
- name: Upload Rendered Output
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: blender-classroom-render
48+
path: ${{ inputs.output_dir }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 'Build Intel Embree'
2+
description: 'Clone and build Embree for Intel GPU with SYCL support'
3+
4+
inputs:
5+
cmake_install_prefix:
6+
description: 'CMAKE_INSTALL_PREFIX for Embree build'
7+
required: false
8+
default: '${{ github.workspace }}/embree-install'
9+
cache_path:
10+
description: 'Path to cache location for repos'
11+
required: false
12+
default: '${{ github.workspace }}/cache'
13+
c_compiler:
14+
description: 'Path to C compiler'
15+
required: true
16+
cxx_compiler:
17+
description: 'Path to C++ compiler'
18+
required: true
19+
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Checkout Embree
24+
uses: ./devops/actions/cached_checkout
25+
with:
26+
repository: 'RenderKit/embree'
27+
path: 'embree-src'
28+
cache_path: "/__w/repo_cache/"
29+
30+
- name: Update Embree Submodules
31+
shell: bash
32+
run: |
33+
cd embree-src
34+
git submodule update --init --recursive
35+
36+
- name: Configure Embree
37+
shell: bash
38+
run: |
39+
cmake -GNinja -B embree-build -S embree-src \
40+
-DCMAKE_BUILD_TYPE=Release \
41+
-DCMAKE_INSTALL_PREFIX="${{ inputs.cmake_install_prefix }}" \
42+
-DCMAKE_C_COMPILER="${{ inputs.c_compiler }}" \
43+
-DCMAKE_CXX_COMPILER="${{ inputs.cxx_compiler }}" \
44+
-DEMBREE_SYCL_SUPPORT=ON \
45+
-DEMBREE_ISPC_SUPPORT=OFF
46+
47+
- name: Build Embree
48+
shell: bash
49+
run: cmake --build embree-build --config Release
50+
51+
- name: Install Embree
52+
shell: bash
53+
run: cmake --install embree-build --config Release
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 'Build Intel Open Image Denoise (OIDN)'
2+
description: 'Clone and build OIDN for Intel GPU with SYCL support'
3+
4+
inputs:
5+
cmake_install_prefix:
6+
description: 'CMAKE_INSTALL_PREFIX for OIDN build'
7+
required: false
8+
default: '${{ github.workspace }}/oidn-install'
9+
cache_path:
10+
description: 'Path to cache location for repos'
11+
required: false
12+
default: '${{ github.workspace }}/cache'
13+
c_compiler:
14+
description: 'Path to C compiler'
15+
required: true
16+
cxx_compiler:
17+
description: 'Path to C++ compiler'
18+
required: true
19+
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Checkout OIDN
24+
uses: ./devops/actions/cached_checkout
25+
with:
26+
repository: 'RenderKit/oidn'
27+
path: 'oidn-src'
28+
cache_path: "/__w/repo_cache/"
29+
30+
- name: Update OIDN Submodules
31+
shell: bash
32+
run: |
33+
cd oidn-src
34+
git submodule update --init --recursive
35+
36+
- name: Configure OIDN
37+
shell: bash
38+
run: |
39+
cmake -GNinja -B oidn-build -S oidn-src \
40+
-DCMAKE_BUILD_TYPE=Release \
41+
-DCMAKE_INSTALL_PREFIX="${{ inputs.cmake_install_prefix }}" \
42+
-DCMAKE_C_COMPILER="${{ inputs.c_compiler }}" \
43+
-DCMAKE_CXX_COMPILER="${{ inputs.cxx_compiler }}" \
44+
-DOIDN_DEVICE_SYCL=ON \
45+
-DOIDN_DEVICE_CUDA=OFF \
46+
-DOIDN_DEVICE_HIP=OFF
47+
48+
- name: Build OIDN
49+
shell: bash
50+
run: cmake --build oidn-build --config Release
51+
52+
- name: Install OIDN
53+
shell: bash
54+
run: cmake --install oidn-build --config Release

0 commit comments

Comments
 (0)