Skip to content

Commit 8dd73ed

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 143f30f + 0e29d2a commit 8dd73ed

1 file changed

Lines changed: 28 additions & 12 deletions

File tree

.github/workflows/build-extended-artifacts.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
pull_request:
1010
branches:
1111
- master
12+
workflow_dispatch:
13+
1214

1315
permissions:
1416
contents: write
@@ -94,19 +96,26 @@ jobs:
9496
files: deepseek-ocr-${{ matrix.variant }}-linux.tar.gz
9597

9698
windows-cuda-binaries:
97-
name: Build Windows CUDA binaries (${{ matrix.cuda }})
99+
name: Build Windows CUDA binaries (${{ matrix.cuda }}, sm_${{ matrix.compute_cap }})
98100
runs-on: windows-latest
99101
timeout-minutes: 120
100102
env:
101-
CUDA_COMPUTE_CAP: "80"
103+
CUDA_COMPUTE_CAP: ${{ matrix.compute_cap }}
102104
strategy:
103105
fail-fast: false
104106
matrix:
107+
cuda: ['12.4.1', '13.0.2']
108+
compute_cap: [70, 75, 80, 86, 89, 120]
105109
include:
106110
- cuda: '12.4.1'
107-
artifact_suffix: cuda12-4-1
111+
artifact_suffix_base: cuda12-4-1
112+
- cuda: '13.0.2'
113+
artifact_suffix_base: cuda13-0-2-preview
114+
exclude:
115+
- cuda: '12.4.1'
116+
compute_cap: 120
108117
- cuda: '13.0.2'
109-
artifact_suffix: cuda13-0-2-preview
118+
compute_cap: 70
110119
steps:
111120
- name: Checkout repository
112121
uses: actions/checkout@v4
@@ -124,6 +133,12 @@ jobs:
124133
restore-keys: |
125134
windows-cargo-
126135
136+
- name: Set up Python
137+
uses: actions/setup-python@v5
138+
if: matrix.cuda == '13.0.2'
139+
with:
140+
python-version: '3.x'
141+
127142
- name: Install CUDA Toolkit ${{ matrix.cuda }}
128143
uses: Jimver/[email protected]
129144
with:
@@ -135,7 +150,7 @@ jobs:
135150
if: matrix.cuda == '13.0.2'
136151
shell: pwsh
137152
run: |
138-
python - <<'PY'
153+
$pythonCode = @"
139154
from pathlib import Path
140155
141156
path = Path('Cargo.toml')
@@ -149,7 +164,8 @@ jobs:
149164
text = text.replace(stable_core, git_core, 1)
150165
text = text.replace(stable_nn, git_nn, 1)
151166
path.write_text(text)
152-
PY
167+
"@
168+
python -c $pythonCode
153169
154170
- name: Upgrade Candle to git tip for CUDA 13
155171
if: matrix.cuda == '13.0.2'
@@ -186,29 +202,29 @@ jobs:
186202
- name: Collect CUDA binaries
187203
shell: pwsh
188204
run: |
189-
$artifactPath = "artifacts\\windows-${{ matrix.artifact_suffix }}"
205+
$artifactPath = "artifacts\\windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}"
190206
New-Item -ItemType Directory -Force -Path $artifactPath | Out-Null
191207
Copy-Item target\release\deepseek-ocr-cli.exe $artifactPath
192208
Copy-Item target\release\deepseek-ocr-server.exe $artifactPath
193209
194210
- name: Upload CUDA Windows binaries
195211
uses: actions/upload-artifact@v4
196212
with:
197-
name: deepseek-ocr-windows-${{ matrix.artifact_suffix }}
198-
path: artifacts\windows-${{ matrix.artifact_suffix }}
213+
name: deepseek-ocr-windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}
214+
path: artifacts\windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}
199215

200216
- name: Package CUDA Windows binaries
201217
shell: pwsh
202218
run: |
203-
$artifactPath = "artifacts\\windows-${{ matrix.artifact_suffix }}"
204-
$zipName = "deepseek-ocr-windows-${{ matrix.artifact_suffix }}.zip"
219+
$artifactPath = "artifacts\\windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}"
220+
$zipName = "deepseek-ocr-windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}.zip"
205221
Compress-Archive -Path "$artifactPath\*" -DestinationPath $zipName -Force
206222
207223
- name: Publish release asset (Windows CUDA)
208224
if: startsWith(github.ref, 'refs/tags/')
209225
uses: softprops/action-gh-release@v2
210226
with:
211-
files: deepseek-ocr-windows-${{ matrix.artifact_suffix }}.zip
227+
files: deepseek-ocr-windows-${{ matrix.artifact_suffix_base }}-sm${{ matrix.compute_cap }}.zip
212228

213229
- name: Restore manifest and lockfile
214230
if: matrix.cuda == '13.0.2'

0 commit comments

Comments
 (0)