-
Notifications
You must be signed in to change notification settings - Fork 824
Expand file tree
/
Copy pathsycl-blender-build-and-test.yml
More file actions
96 lines (86 loc) · 3.31 KB
/
sycl-blender-build-and-test.yml
File metadata and controls
96 lines (86 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build and Test Blender
on:
workflow_call:
inputs:
runner:
type: string
required: true
level_zero_dir:
description: 'Root directory of Level Zero SDK installation'
required: false
type: string
default: ''
ccache_dir:
description: 'ccache directory'
required: true
type: string
blender_classroom_dir:
description: 'Blender classroom demo directory'
required: true
type: string
toolchain_artifact:
description: 'Artifact name for toolchain download'
required: true
type: string
toolchain_artifact_filename:
description: 'Toolchain artifact downloaded filename'
required: true
type: string
env:
OIDN_INSTALL_DIR: "${{ github.workspace }}/oidn-install"
EMBREE_INSTALL_DIR: "${{ github.workspace }}/embree-install"
BLENDER_INSTALL_DIR: "${{ github.workspace }}/blender-install"
jobs:
blender:
runs-on: ${{ fromJSON(inputs.runner) }}
name: Build and Test Blender on ${{ contains(inputs.runner, 'Windows') && 'Windows' || 'Linux' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: |
devops/
persist-credentials: false
- name: Download Toolchain
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.toolchain_artifact }}
- name: Extract Toolchain
shell: bash
env:
TOOLCHAIN_ARTIFACT_FILENAME: ${{ inputs.toolchain_artifact_filename }}
run: |
rm -rf install
mkdir install
tar -xf $TOOLCHAIN_ARTIFACT_FILENAME -C install
rm $TOOLCHAIN_ARTIFACT_FILENAME
- name: Build OIDN
uses: ./devops/actions/blender/oidn
with:
cmake_install_prefix: ${{ env.OIDN_INSTALL_DIR }}
c_compiler: ${{ github.workspace }}/install/bin/clang${{ runner.os == 'Windows' && '.exe' }}
cxx_compiler: ${{ github.workspace }}/install/bin/clang++${{ runner.os == 'Windows' && '.exe' }}
- name: Build Embree
uses: ./devops/actions/blender/embree
with:
cmake_install_prefix: ${{ env.EMBREE_INSTALL_DIR }}
c_compiler: ${{ github.workspace }}/install/bin/clang${{ runner.os == 'Windows' && '.exe' }}
cxx_compiler: ${{ github.workspace }}/install/bin/clang++${{ runner.os == 'Windows' && '.exe' }}
- name: Build Blender
uses: ./devops/actions/blender/blender-build
with:
oidn_dir: ${{ env.OIDN_INSTALL_DIR }}
embree_dir: ${{ env.EMBREE_INSTALL_DIR }}
level_zero_dir: ${{ inputs.level_zero_dir }}
cmake_install_prefix: ${{ env.BLENDER_INSTALL_DIR }}
sycl_dir: ${{ github.workspace }}/install
ccache_dir: ${{ inputs.ccache_dir }}
- name: Run Blender Classroom Demo
uses: ./devops/actions/blender/blender-demo
with:
blender_dir: ${{ github.workspace }}/blender-install
blender_classroom_dir: ${{ inputs.blender_classroom_dir }}
- name: Cleanup
shell: cmd
if: always()
run: |
rmdir /q /s "${{ env.OIDN_INSTALL_DIR }}" "${{ env.EMBREE_INSTALL_DIR }}" "${{ env.BLENDER_INSTALL_DIR }}"