Files
rustdesk-yowie/.gitea/workflows/build.yml
T
alex 489049bbaa
Build patched rustdesk.exe / Build Win x64 (Sciter UI) (push) Failing after 26s
ci: force vcpkg classic mode (manifest pulls heavy ffmpeg path not needed for Sciter UI)
2026-05-02 23:31:49 +10:00

129 lines
5.5 KiB
YAML

# Yowie IT - RustDesk patched-binary build pipeline
# =====================================================================
# Builds the Sciter-UI rustdesk.exe with our get_cursor() patch for
# upstream issue #672 (always emit cursor data on Windows endpoints
# regardless of physical mouse presence).
#
# Self-hosted Windows runner: yowie-admin-pc.
# Toolchain version pins match upstream rustdesk CI (LLVM 16.0.0, vcpkg
# at 120deac3, Rust stable).
name: Build patched rustdesk.exe
on:
push:
branches: [yowie-master]
workflow_dispatch:
env:
LLVM_VERSION: "16.0.0"
VCPKG_COMMIT_ID: "120deac3062162151622ca4860575a33844ba10b"
CARGO_BIN: 'C:\Users\Yowie\.cargo\bin'
jobs:
build:
name: Build Win x64 (Sciter UI)
runs-on: windows-x64
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Verify Rust toolchain
shell: powershell
run: |
& "$env:CARGO_BIN\rustc.exe" --version
& "$env:CARGO_BIN\cargo.exe" --version
- name: Setup LLVM 16 (pre-staged on runner host)
shell: powershell
run: |
# LLVM 16.0.0 is pre-staged at C:\LLVM16 on yowie-admin-pc.
# Bootstrap path documented in feedback memory file (extracted
# from LLVM-16.0.0-win64.exe NSIS installer via choco's 7z.exe).
# Re-running NSIS install on every CI run was infeasible: the
# LLVM win64.exe demands UAC elevation even with /S, and there
# is no Windows tar.xz asset for LLVM 16 (only NSIS).
if (-not (Test-Path 'C:\LLVM16\bin\libclang.dll')) {
throw "LLVM 16 not pre-staged on runner; expected C:\LLVM16\bin\libclang.dll. Re-run runner-bootstrap script."
}
$sz = (Get-Item 'C:\LLVM16\bin\libclang.dll').Length
Write-Output "libclang.dll: $([math]::Round($sz/1MB,2)) MB"
& 'C:\LLVM16\bin\clang.exe' --version | Select-Object -First 1
echo "LIBCLANG_PATH=C:\LLVM16\bin" >> $env:GITHUB_ENV
echo "C:\LLVM16\bin" >> $env:GITHUB_PATH
- name: Setup vcpkg pinned commit
shell: powershell
run: |
if (-not (Test-Path 'C:\vcpkg\vcpkg.exe')) {
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
}
Push-Location C:\vcpkg
git fetch --depth=200 origin $env:VCPKG_COMMIT_ID
git checkout $env:VCPKG_COMMIT_ID
.\bootstrap-vcpkg.bat -disableMetrics
Pop-Location
echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV
echo "C:\vcpkg" >> $env:GITHUB_PATH
- name: Install vcpkg native deps
shell: powershell
run: |
# --feature-flags=-manifests forces classic mode -- the repo
# has a vcpkg.json that pulls in ffmpeg+amf+nvcodec+qsv (hwcodec
# path) which is a 2hr build and not needed for Sciter UI.
# Sciter only needs the codec/image libs below.
C:\vcpkg\vcpkg.exe install --feature-flags=-manifests --triplet x64-windows-static libvpx libyuv opus aom libjpeg-turbo
- name: cargo build --release (Sciter UI)
shell: powershell
run: |
& "$env:CARGO_BIN\cargo.exe" build --release --no-default-features --features inline
- name: Verify binary + patch marker
shell: powershell
run: |
$exe = "target\release\rustdesk.exe"
if (-not (Test-Path $exe)) { throw "rustdesk.exe not produced" }
$size = (Get-Item $exe).Length
Write-Output "rustdesk.exe size: $size bytes"
if (-not (Select-String -Path "src\platform\windows.rs" -Pattern "Yowie IT MSP fork" -Quiet)) {
throw "patch marker missing from src\platform\windows.rs"
}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: rustdesk-yowie-windows-x64
path: target/release/rustdesk.exe
retention-days: 30
- name: Publish Gitea release (stable URL for OnRamp + Apply-YowieRustDeskPatch.sh)
shell: powershell
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
$tag = "build-$($env:GITHUB_SHA.Substring(0,7))-$(Get-Date -Format yyyyMMddHHmm)"
$body = @{
tag_name = $tag
target_commitish = "yowie-master"
name = "Yowie patched rustdesk.exe ($tag)"
body = "Automated build from CI. Patch: get_cursor() always emits IDC_ARROW (issue #672). SHA: $env:GITHUB_SHA"
draft = $false
prerelease = $false
} | ConvertTo-Json -Compress
$headers = @{ "Authorization" = "token $env:RELEASE_TOKEN"; "Content-Type" = "application/json" }
$rel = Invoke-RestMethod -Uri "https://git.yowieit.com/api/v1/repos/infra/rustdesk-yowie/releases" -Method Post -Headers $headers -Body $body
Write-Output "release id: $($rel.id), tag: $($rel.tag_name)"
# Upload rustdesk.exe as release asset via curl.exe (Win 10+ bundled)
# -- PowerShell multipart binary handling is fragile; curl.exe -F is bulletproof.
$assetUri = "https://git.yowieit.com/api/v1/repos/infra/rustdesk-yowie/releases/$($rel.id)/assets?name=rustdesk.exe"
& curl.exe -sk -X POST `
-H "Authorization: token $env:RELEASE_TOKEN" `
-F "attachment=@target/release/rustdesk.exe" `
"$assetUri"
Write-Output ""
Write-Output "release asset URL: https://git.yowieit.com/infra/rustdesk-yowie/releases/download/$tag/rustdesk.exe"