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,29 +139,29 @@ 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
149
runs-on : windows-latest
131
150
132
151
strategy :
133
152
matrix :
134
153
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'
154
+ - build : " noavx"
155
+ defines : " -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON"
156
+ - build : " avx2"
157
+ defines : " -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
158
+ - build : " avx"
159
+ defines : " -DGGML_AVX2=OFF -DSD_BUILD_SHARED_LIBS=ON"
160
+ - build : " avx512"
161
+ defines : " -DGGML_AVX512=ON -DSD_BUILD_SHARED_LIBS=ON"
162
+ - build : " cuda12"
163
+ defines : " -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON"
164
+ - build : " rocm5.5"
146
165
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'
147
166
steps :
148
167
- name : Clone
@@ -156,16 +175,16 @@ jobs:
156
175
if : ${{ matrix.build == 'cuda12' }}
157
176
uses : Jimver/cuda-toolkit@v0.2.11
158
177
with :
159
- cuda : ' 12.2.0'
160
- method : ' network'
178
+ cuda : " 12.2.0"
179
+ method : " network"
161
180
sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
162
181
163
182
- name : Install rocm-toolkit
164
183
id : rocm-toolkit
165
184
if : ${{ matrix.build == 'rocm5.5' }}
166
185
uses : Cyberhan123/rocm-toolkit@v0.1.0
167
186
with :
168
- rocm : ' 5.5.0'
187
+ rocm : " 5.5.0"
169
188
170
189
- name : Install Ninja
171
190
id : install-ninja
@@ -231,15 +250,17 @@ jobs:
231
250
232
251
- name : Upload Cuda runtime
233
252
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
253
+ uses : actions/upload-artifact@v4
235
254
with :
255
+ name : sd-cudart-sd-bin-win-cu12-x64.zip
236
256
path : |
237
257
cudart-sd-bin-win-cu12-x64.zip
238
258
239
259
- name : Upload artifacts
240
260
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
241
- uses : actions/upload-artifact@v3
261
+ uses : actions/upload-artifact@v4
242
262
with :
263
+ name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
243
264
path : |
244
265
sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
245
266
@@ -256,7 +277,11 @@ jobs:
256
277
steps :
257
278
- name : Download artifacts
258
279
id : download-artifact
259
- uses : actions/download-artifact@v3
280
+ uses : actions/download-artifact@v4
281
+ with :
282
+ path : ./artifact
283
+ pattern : sd-*
284
+ merge-multiple : true
260
285
261
286
- name : Get commit hash
262
287
id : commit
0 commit comments