Skip to content

Commit 357c353

Browse files
committed
Harden ARM64 native build workflow
1 parent 3e2f6de commit 357c353

1 file changed

Lines changed: 60 additions & 2 deletions

File tree

.github/workflows/ci_windows_arm64_native.yaml

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ jobs:
161161
-DCMAKE_TOOLCHAIN_FILE="$toolchain" `
162162
-DBOOST_ROOT="$boostRoot" `
163163
-DBUILD_SHARED_LIBS=OFF `
164-
-Ddeprecated-functions=OFF `
164+
-Dmmap-disk-io=OFF `
165+
-Ddeprecated-functions=ON `
165166
-Dstatic_runtime=ON `
166167
-DVCPKG_TARGET_TRIPLET=${{ env.vcpkg_triplet }}
167168
@@ -178,7 +179,6 @@ jobs:
178179
$libtorrentDir = (Get-Item "${{ env.libtorrent_root }}").FullName.Replace('\\', '/') + '/lib/cmake/LibtorrentRasterbar'
179180
180181
$env:Path = "$qtTargetRoot/bin;$env:Path"
181-
$env:LDFLAGS += " /FORCE:MULTIPLE"
182182
183183
aria2c "$env:QBT_URL"
184184
tar -xf "qbittorrent-release-${{ env.qbt_version }}.tar.gz"
@@ -256,6 +256,64 @@ jobs:
256256
name: ${{ matrix.artifact_name }}
257257
path: artifact
258258

259+
smoke-test-windows-arm64-native:
260+
name: Smoke test Native ARM64 (${{ matrix.libt_variant }})
261+
needs: build-windows-arm64-native
262+
runs-on: windows-latest
263+
strategy:
264+
fail-fast: false
265+
matrix:
266+
include:
267+
- libt_variant: lt12
268+
artifact_name: arm64-native-lt12
269+
archive_suffix: ""
270+
- libt_variant: lt20
271+
artifact_name: arm64-native-lt20
272+
archive_suffix: "_lt20"
273+
274+
steps:
275+
- name: Download build artifact
276+
uses: actions/download-artifact@v4
277+
with:
278+
name: ${{ matrix.artifact_name }}
279+
path: artifact
280+
281+
- name: Run qBittorrent smoke test
282+
shell: pwsh
283+
run: |
284+
$zipFile = Get-ChildItem artifact -Filter "qbittorrent_*.zip" -File | Select-Object -First 1
285+
if (-not $zipFile) {
286+
throw "No packaged artifact zip found in downloaded build output"
287+
}
288+
289+
$smokeRoot = Join-Path $env:RUNNER_TEMP "qbittorrent-smoke-${{ matrix.libt_variant }}"
290+
New-Item -ItemType Directory -Path $smokeRoot -Force | Out-Null
291+
Expand-Archive -Path $zipFile.FullName -DestinationPath $smokeRoot -Force
292+
293+
$exePath = Join-Path $smokeRoot "qbittorrent.exe"
294+
if (-not (Test-Path $exePath)) {
295+
throw "qbittorrent.exe was not found after extracting the build artifact"
296+
}
297+
298+
New-Item -ItemType Directory -Path (Join-Path $smokeRoot "profile") -Force | Out-Null
299+
300+
$process = Start-Process -FilePath $exePath -WorkingDirectory $smokeRoot -PassThru
301+
try {
302+
Wait-Process -Id $process.Id -Timeout 45 -ErrorAction Stop
303+
} catch {
304+
if (-not $process.HasExited) {
305+
Stop-Process -Id $process.Id -Force
306+
Write-Host "qBittorrent stayed alive for the smoke-test window"
307+
return
308+
}
309+
310+
throw
311+
}
312+
313+
if ($process.ExitCode -ne 0) {
314+
throw "qBittorrent exited with code $($process.ExitCode) during the smoke test"
315+
}
316+
259317
publish-release:
260318
name: Publish release assets
261319
needs: build-windows-arm64-native

0 commit comments

Comments
 (0)