-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`lxmonika` and the `monika.exe` CLI will be built and packed for all supported architectures for each commit. Monix is not included. This workflow only includes a basic build. No testing is carried out yet.
- Loading branch information
1 parent
be8d24a
commit e3edb51
Showing
3 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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@v4 | ||
with: | ||
# Fetch everything for build metadata to work | ||
fetch-depth: 0 | ||
|
||
- name: Install build dependencies | ||
run: powershell.exe -File ${{ github.workspace }}\setup.ps1 | ||
shell: cmd | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- 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@v4 | ||
with: | ||
name: monika_${{ matrix.platform }}_${{ matrix.configuration }} | ||
path: out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
param( | ||
[Parameter(Mandatory=$true)] | ||
[string]$Platform, | ||
[Parameter(Mandatory=$true)] | ||
[string]$Configuration | ||
) | ||
|
||
$outDir = (Join-Path $PSScriptRoot "out") | ||
|
||
Remove-Item -Recurse -Path $outDir | ||
mkdir $outDir | Out-Null | ||
|
||
function Get-LxMonikaArtifact( | ||
[string]$Project, | ||
[string]$File | ||
) | ||
{ | ||
return Join-Path "$PSScriptRoot\$Project\bin\$Configuration\$Platform" $File | ||
} | ||
|
||
# monika.exe | ||
|
||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "monika" "monika.exe") ` | ||
-Destination $outDir | ||
|
||
# lxmonika | ||
|
||
$usefulExts = @(".sys", ".lib", ".cer") | ||
|
||
foreach ($ext in $usefulExts) | ||
{ | ||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "lxmonika" "lxmonika$ext") ` | ||
-Destination $outDir | ||
} | ||
|
||
# lxstub | ||
|
||
foreach ($ext in $usefulExts) | ||
{ | ||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "lxstub" "LXCORE$ext") ` | ||
-Destination $outDir | ||
} | ||
|
||
# PDBs | ||
|
||
$pdbDir = (Join-Path $outDir "pdb") | ||
mkdir $pdbDir | Out-Null | ||
|
||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "monika" "monika.pdb") ` | ||
-Destination $pdbDir | ||
|
||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "lxmonika" "lxmonika.pdb") ` | ||
-Destination $pdbDir | ||
|
||
Copy-Item ` | ||
-Path (Get-LxMonikaArtifact "lxstub" "LXCORE.pdb") ` | ||
-Destination $pdbDir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Setup WDK and corresponding SDK | ||
|
||
curl.exe ` | ||
-SL https://download.microsoft.com/download/C/D/8/CD8533F8-5324-4D30-824C-B834C5AD51F9/standalonesdk/sdksetup.exe ` | ||
-o sdksetup_14393.exe | ||
Start-Process .\sdksetup_14393.exe -Wait -ArgumentList '/ceip off /features + /q' | ||
Remove-Item sdksetup_14393.exe | ||
|
||
curl.exe ` | ||
-SL https://download.microsoft.com/download/8/1/6/816FE939-15C7-4185-9767-42ED05524A95/wdk/wdksetup.exe ` | ||
-o wdksetup_14393.exe | ||
Start-Process .\wdksetup_14393.exe -Wait -ArgumentList '/ceip off /features + /q' | ||
Remove-Item wdksetup_14393.exe | ||
|
||
curl.exe ` | ||
-SL https://download.microsoft.com/download/5/A/0/5A08CEF4-3EC9-494A-9578-AB687E716C12/windowssdk/winsdksetup.exe ` | ||
-o sdksetup_17134.exe | ||
Start-Process .\sdksetup_17134.exe -Wait -ArgumentList '/ceip off /features + /q' | ||
Remove-Item sdksetup_17134.exe | ||
|
||
curl.exe ` | ||
-SL https://download.microsoft.com/download/B/5/8/B58D625D-17D6-47A8-B3D3-668670B6D1EB/wdk/wdksetup.exe ` | ||
-o wdksetup_17134.exe | ||
Start-Process .\wdksetup_17134.exe -Wait -ArgumentList '/ceip off /features + /q' | ||
Remove-Item wdksetup_17134.exe | ||
|
||
# Hacks to enable ARM32 builds | ||
|
||
$vsPath = (vswhere -property installationPath | Out-String).Trim(); | ||
|
||
$arm64Path = (Join-Path $vsPath "\MSBuild\Microsoft\VC\v170\Platforms\ARM64"); | ||
$armPath = (Join-Path $vsPath "\MSBuild\Microsoft\VC\v170\Platforms\ARM") | ||
|
||
if (Test-Path $arm64Path) | ||
{ | ||
Push-Location $arm64Path | ||
foreach ($file in (Get-ChildItem -Recurse $arm64Path -File)) | ||
{ | ||
$relativePath = Resolve-Path -Path $file.FullName -Relative | ||
$armFilePath = Join-Path $armPath $relativePath | ||
if (Test-Path (Join-Path $armPath $relativePath)) | ||
{ | ||
continue; | ||
} | ||
Copy-Item -Path $file.FullName -Destination $armFilePath -Force -Verbose | ||
} | ||
Pop-Location | ||
} |