first commit
This commit is contained in:
1 file changed
+129
@@ -0,0 +1,129 @@
|
|||||||
|
name: Windows Runner Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test Windows RustDesk Builder
|
||||||
|
runs-on: rustdesk-windows
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check environment
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
Write-Host "===== Windows ====="
|
||||||
|
Get-ComputerInfo |
|
||||||
|
Select-Object WindowsProductName, WindowsVersion, OsBuildNumber
|
||||||
|
|
||||||
|
Write-Host "`n===== Git ====="
|
||||||
|
git --version
|
||||||
|
|
||||||
|
Write-Host "`n===== Python ====="
|
||||||
|
python --version
|
||||||
|
|
||||||
|
Write-Host "`n===== CMake ====="
|
||||||
|
cmake --version
|
||||||
|
|
||||||
|
Write-Host "`n===== Ninja ====="
|
||||||
|
ninja --version
|
||||||
|
|
||||||
|
Write-Host "`n===== NASM ====="
|
||||||
|
nasm -v
|
||||||
|
|
||||||
|
Write-Host "`n===== LLVM ====="
|
||||||
|
clang --version
|
||||||
|
Write-Host "LIBCLANG_PATH=$env:LIBCLANG_PATH"
|
||||||
|
|
||||||
|
if (-not (Test-Path "$env:LIBCLANG_PATH\libclang.dll")) {
|
||||||
|
throw "libclang.dll not found"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n===== Rust ====="
|
||||||
|
rustc --version
|
||||||
|
cargo --version
|
||||||
|
rustfmt --version
|
||||||
|
|
||||||
|
$targets = rustup target list --installed
|
||||||
|
$targets
|
||||||
|
|
||||||
|
if ($targets -notcontains "x86_64-pc-windows-msvc") {
|
||||||
|
throw "x86_64-pc-windows-msvc target missing"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n===== Flutter ====="
|
||||||
|
flutter --version
|
||||||
|
|
||||||
|
Write-Host "`n===== RustDesk Flutter patch ====="
|
||||||
|
|
||||||
|
$flutterStatus = git `
|
||||||
|
-C "C:\BuildTools\flutter-3.24.5" `
|
||||||
|
status --short
|
||||||
|
|
||||||
|
Write-Host $flutterStatus
|
||||||
|
|
||||||
|
if ($flutterStatus -notmatch "dropdown_menu.dart") {
|
||||||
|
throw "RustDesk Flutter patch missing"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n===== RustDesk custom Flutter engine ====="
|
||||||
|
|
||||||
|
$engine = "C:\BuildTools\flutter-3.24.5\bin\cache\artifacts\engine\windows-x64-release"
|
||||||
|
|
||||||
|
foreach ($file in @(
|
||||||
|
"flutter_windows.dll",
|
||||||
|
"flutter_windows.dll.lib",
|
||||||
|
"gen_snapshot.exe"
|
||||||
|
)) {
|
||||||
|
$path = Join-Path $engine $file
|
||||||
|
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
throw "Missing custom Flutter engine file: $path"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "$file OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n===== vcpkg ====="
|
||||||
|
vcpkg version
|
||||||
|
Write-Host "VCPKG_ROOT=$env:VCPKG_ROOT"
|
||||||
|
|
||||||
|
$vcpkgCommit = git -C C:\vcpkg rev-parse HEAD
|
||||||
|
Write-Host "vcpkg commit: $vcpkgCommit"
|
||||||
|
|
||||||
|
if ($vcpkgCommit -ne "120deac3062162151622ca4860575a33844ba10b") {
|
||||||
|
throw "Wrong vcpkg commit"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n===== MSVC ====="
|
||||||
|
|
||||||
|
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||||
|
|
||||||
|
if (-not (Test-Path $vswhere)) {
|
||||||
|
throw "vswhere.exe not found"
|
||||||
|
}
|
||||||
|
|
||||||
|
$vs = & $vswhere `
|
||||||
|
-latest `
|
||||||
|
-products * `
|
||||||
|
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
|
||||||
|
-property installationPath
|
||||||
|
|
||||||
|
if (-not $vs) {
|
||||||
|
throw "Visual Studio C++ Build Tools not found"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Visual Studio: $vs"
|
||||||
|
|
||||||
|
cmd.exe /c "`"$vs\Common7\Tools\VsDevCmd.bat`" -arch=amd64 -host_arch=amd64 && cl.exe"
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "cl.exe check failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "=========================================="
|
||||||
|
Write-Host "RustDesk Windows builder environment READY"
|
||||||
|
Write-Host "=========================================="
|
||||||
Reference in new issue
Block a user