4
4
workflow_dispatch : # allows manual triggering
5
5
inputs :
6
6
create_release :
7
- description : ' Create new release'
7
+ description : " Create new release"
8
8
required : true
9
9
type : boolean
10
10
push :
11
11
branches :
12
12
- master
13
13
- ci
14
- paths : ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu']
14
+ paths :
15
+ [
16
+ " .github/workflows/**" ,
17
+ " **/CMakeLists.txt" ,
18
+ " **/Makefile" ,
19
+ " **/*.h" ,
20
+ " **/*.hpp" ,
21
+ " **/*.c" ,
22
+ " **/*.cpp" ,
23
+ " **/*.cu" ,
24
+ ]
15
25
pull_request :
16
26
types : [opened, synchronize, reopened]
17
- paths : ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu']
27
+ paths :
28
+ [
29
+ " **/CMakeLists.txt" ,
30
+ " **/Makefile" ,
31
+ " **/*.h" ,
32
+ " **/*.hpp" ,
33
+ " **/*.c" ,
34
+ " **/*.cpp" ,
35
+ " **/*.cu" ,
36
+ ]
18
37
19
38
env :
20
39
BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
@@ -67,12 +86,12 @@ jobs:
67
86
68
87
- name : Upload artifacts
69
88
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
70
- uses : actions/upload-artifact@v3
89
+ uses : actions/upload-artifact@v4
71
90
with :
91
+ name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
72
92
path : |
73
93
sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
74
94
75
-
76
95
macOS-latest-cmake :
77
96
runs-on : macos-latest
78
97
@@ -120,30 +139,35 @@ jobs:
120
139
121
140
- name : Upload artifacts
122
141
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
123
- uses : actions/upload-artifact@v3
142
+ uses : actions/upload-artifact@v4
124
143
with :
144
+ name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
125
145
path : |
126
146
sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
127
147
128
-
129
148
windows-latest-cmake :
130
- runs-on : windows-latest
149
+ runs-on : windows-2019
150
+
151
+ env :
152
+ VULKAN_VERSION : 1.3.261.1
131
153
132
154
strategy :
133
155
matrix :
134
156
include :
135
- - build : ' noavx'
136
- defines : ' -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON'
137
- - build : ' avx2'
138
- defines : ' -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON'
139
- - build : ' avx'
140
- defines : ' -DGGML_AVX2=OFF -DSD_BUILD_SHARED_LIBS=ON'
141
- - build : ' avx512'
142
- defines : ' -DGGML_AVX512=ON -DSD_BUILD_SHARED_LIBS=ON'
143
- - build : ' cuda12'
144
- defines : ' -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON'
145
- - build : ' rocm5.5'
157
+ - build : " noavx"
158
+ defines : " -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON"
159
+ - build : " avx2"
160
+ defines : " -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
161
+ - build : " avx"
162
+ defines : " -DGGML_AVX2=OFF -DSD_BUILD_SHARED_LIBS=ON"
163
+ - build : " avx512"
164
+ defines : " -DGGML_AVX512=ON -DSD_BUILD_SHARED_LIBS=ON"
165
+ - build : " cuda12"
166
+ defines : " -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON"
167
+ - build : " rocm5.5"
146
168
defines : ' -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS="gfx1100;gfx1102;gfx1030" -DSD_BUILD_SHARED_LIBS=ON'
169
+ - build : ' vulkan'
170
+ defines : " -DSD_VULKAN=ON -DSD_BUILD_SHARED_LIBS=ON"
147
171
steps :
148
172
- name : Clone
149
173
id : checkout
@@ -156,23 +180,31 @@ jobs:
156
180
if : ${{ matrix.build == 'cuda12' }}
157
181
uses : Jimver/cuda-toolkit@v0.2.11
158
182
with :
159
- cuda : ' 12.2.0'
160
- method : ' network'
183
+ cuda : " 12.2.0"
184
+ method : " network"
161
185
sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
162
186
163
187
- name : Install rocm-toolkit
164
188
id : rocm-toolkit
165
189
if : ${{ matrix.build == 'rocm5.5' }}
166
190
uses : Cyberhan123/rocm-toolkit@v0.1.0
167
191
with :
168
- rocm : ' 5.5.0'
192
+ rocm : " 5.5.0"
169
193
170
194
- name : Install Ninja
171
195
id : install-ninja
172
196
if : ${{ matrix.build == 'rocm5.5' }}
173
197
uses : urkle/action-get-ninja@v1
174
198
with :
175
199
version : 1.11.1
200
+ - name : Install Vulkan SDK
201
+ id : get_vulkan
202
+ if : ${{ matrix.build == 'vulkan' }}
203
+ run : |
204
+ curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe"
205
+ & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
206
+ Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
207
+ Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
176
208
177
209
- name : Build
178
210
id : cmake_build
@@ -231,15 +263,17 @@ jobs:
231
263
232
264
- name : Upload Cuda runtime
233
265
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
234
- uses : actions/upload-artifact@v3
266
+ uses : actions/upload-artifact@v4
235
267
with :
268
+ name : sd-cudart-sd-bin-win-cu12-x64.zip
236
269
path : |
237
270
cudart-sd-bin-win-cu12-x64.zip
238
271
239
272
- name : Upload artifacts
240
273
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
241
- uses : actions/upload-artifact@v3
274
+ uses : actions/upload-artifact@v4
242
275
with :
276
+ name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
243
277
path : |
244
278
sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
245
279
@@ -256,7 +290,11 @@ jobs:
256
290
steps :
257
291
- name : Download artifacts
258
292
id : download-artifact
259
- uses : actions/download-artifact@v3
293
+ uses : actions/download-artifact@v4
294
+ with :
295
+ path : ./artifact
296
+ pattern : sd-*
297
+ merge-multiple : true
260
298
261
299
- name : Get commit hash
262
300
id : commit
0 commit comments