Skip to content

Commit 8142803

Browse files
authored
chore: update artifact actions (leejet#267)
1 parent 1d2af5c commit 8142803

File tree

1 file changed

+49
-24
lines changed

1 file changed

+49
-24
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,36 @@ on:
44
workflow_dispatch: # allows manual triggering
55
inputs:
66
create_release:
7-
description: 'Create new release'
7+
description: "Create new release"
88
required: true
99
type: boolean
1010
push:
1111
branches:
1212
- master
1313
- 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+
]
1525
pull_request:
1626
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+
]
1837

1938
env:
2039
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
@@ -67,12 +86,12 @@ jobs:
6786
6887
- name: Upload artifacts
6988
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
7190
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
7292
path: |
7393
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
7494
75-
7695
macOS-latest-cmake:
7796
runs-on: macos-latest
7897

@@ -120,29 +139,29 @@ jobs:
120139
121140
- name: Upload artifacts
122141
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
124143
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
125145
path: |
126146
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
127147
128-
129148
windows-latest-cmake:
130149
runs-on: windows-latest
131150

132151
strategy:
133152
matrix:
134153
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"
146165
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'
147166
steps:
148167
- name: Clone
@@ -156,16 +175,16 @@ jobs:
156175
if: ${{ matrix.build == 'cuda12' }}
157176
uses: Jimver/cuda-toolkit@v0.2.11
158177
with:
159-
cuda: '12.2.0'
160-
method: 'network'
178+
cuda: "12.2.0"
179+
method: "network"
161180
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
162181

163182
- name: Install rocm-toolkit
164183
id: rocm-toolkit
165184
if: ${{ matrix.build == 'rocm5.5' }}
166185
uses: Cyberhan123/rocm-toolkit@v0.1.0
167186
with:
168-
rocm: '5.5.0'
187+
rocm: "5.5.0"
169188

170189
- name: Install Ninja
171190
id: install-ninja
@@ -231,15 +250,17 @@ jobs:
231250
232251
- name: Upload Cuda runtime
233252
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
235254
with:
255+
name: sd-cudart-sd-bin-win-cu12-x64.zip
236256
path: |
237257
cudart-sd-bin-win-cu12-x64.zip
238258
239259
- name: Upload artifacts
240260
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
242262
with:
263+
name: sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
243264
path: |
244265
sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
245266
@@ -256,7 +277,11 @@ jobs:
256277
steps:
257278
- name: Download artifacts
258279
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
260285

261286
- name: Get commit hash
262287
id: commit

0 commit comments

Comments
 (0)