@@ -163,7 +163,7 @@ jobs:
163163 - build : " avx512"
164164 defines : " -DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX=ON -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
165165 - build : " cuda12"
166- defines : " -DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES=90;89;80;75"
166+ defines : " -DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES=90;89;86; 80;75"
167167 # - build: "rocm5.5"
168168 # 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'
169169 - build : ' vulkan'
@@ -254,15 +254,15 @@ jobs:
254254
255255 - name : Copy and pack Cuda runtime
256256 id : pack_cuda_runtime
257- if : ${{ ( github.event_name == 'push ' && github.ref == 'refs/heads/master ' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
257+ if : ${{ matrix.build == 'cuda12 ' && ( github.event_name == 'push ' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
258258 run : |
259259 echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
260260 $dst='.\build\bin\cudart\'
261261 robocopy "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
262262 7z a cudart-sd-bin-win-cu12-x64.zip $dst\*
263263
264264 - name : Upload Cuda runtime
265- if : ${{ ( github.event_name == 'push ' && github.ref == 'refs/heads/master ' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
265+ if : ${{ matrix.build == 'cuda12 ' && ( github.event_name == 'push ' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
266266 uses : actions/upload-artifact@v4
267267 with :
268268 name : sd-cudart-sd-bin-win-cu12-x64.zip
@@ -288,6 +288,11 @@ jobs:
288288 - windows-latest-cmake
289289
290290 steps :
291+ - name : Clone
292+ uses : actions/checkout@v3
293+ with :
294+ fetch-depth : 0
295+
291296 - name : Download artifacts
292297 id : download-artifact
293298 uses : actions/download-artifact@v4
@@ -296,20 +301,27 @@ jobs:
296301 pattern : sd-*
297302 merge-multiple : true
298303
304+ - name : Get commit count
305+ id : commit_count
306+ run : |
307+ echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
308+
299309 - name : Get commit hash
300310 id : commit
301311 uses : pr-mpt/actions-commit-hash@v2
302312
303313 - name : Create release
304314 id : create_release
315+ if : ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
305316 uses : anzz1/action-create-release@v1
306317 env :
307318 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
308319 with :
309- tag_name : ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
320+ tag_name : ${{ format('{0}-{1}-{2}', env.BRANCH_NAME, steps.commit_count.outputs.count, steps. commit.outputs.short) }}
310321
311322 - name : Upload release
312323 id : upload_release
324+ if : ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
313325 uses : actions/github-script@v3
314326 with :
315327 github-token : ${{secrets.GITHUB_TOKEN}}
0 commit comments