-
-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (72 loc) · 2.57 KB
/
Copy pathbuild.yml
File metadata and controls
83 lines (72 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build
on:
push:
branches:
- "master"
- "staging"
- "dev/**"
pull_request:
branches:
- "master"
jobs:
build:
strategy:
matrix:
platform: [x86, x64, ARM, ARM64]
configuration: [Debug, Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# Fetch everything for build metadata to work
fetch-depth: 0
- name: Uninstall Windows SDK/WDK
run: |
# Windows SDK/WDK 26100 are problematic. They do not coexist peacefully with older kits.
# For now, we nuke every existing kit on the cloud and replace them with our own script.
# Once we migrate to clang for 32-bit and VS2026 for 64-bit, we can remove this step.
$KitPatterns = @(
"Windows Software Development Kit - Windows 10.0.*",
"Windows Driver Kit - Windows 10.0.*"
)
$Kits = `
Get-ChildItem -Path `
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", `
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" |
Get-ItemProperty |
Where-Object {
$name = $_.DisplayName
$match = $false
foreach ($p in $KitPatterns) { if ($name -like $p) { $match = $true } }
$match
}
foreach ($kit in $Kits) {
Write-Host "Uninstalling: $($kit.DisplayName)" -ForegroundColor Cyan
Start-Process cmd.exe -ArgumentList "/c $($kit.QuietUninstallString)" -Wait -NoNewWindow
}
shell: powershell
- name: Install build dependencies
run: powershell.exe -File ${{ github.workspace }}\setup.ps1
shell: cmd
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
with:
msbuild-architecture: x64
- name: Build
run: |
msbuild ${{ github.workspace }}\lxmonika.sln ^
/p:Platform=${{ matrix.platform }} ^
/p:Configuration=${{ matrix.configuration }}
shell: cmd
- name: Pack build artifacts
run: |
powershell.exe -File ${{ github.workspace }}\pack.ps1 ^
-Platform ${{ matrix.platform }} ^
-Configuration ${{ matrix.configuration }}
shell: cmd
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: monika_${{ matrix.configuration }}_${{ matrix.platform }}
path: out/${{ matrix.configuration }}