Files
eepp/.github/workflows/eepp-windows-build-check.yml
2026-08-22 18:33:11 -03:00

118 lines
4.3 KiB
YAML

name: Windows
on: [push, pull_request]
permissions:
contents: write
jobs:
Windows:
runs-on: windows-latest
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Configure Git
shell: cmd
run: |
git config --system core.autocrlf false
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
fetch-depth: 2
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Install dependencies
shell: powershell
run: |
Invoke-WebRequest -Uri "https://github.com/premake/premake-core/releases/download/v5.0.0-beta6/premake-5.0.0-beta6-windows.zip" -OutFile "premake-5.0.0-beta6-windows.zip"
Expand-Archive -DestinationPath . -Path premake-5.0.0-beta6-windows.zip
- name: Create project
shell: powershell
run: |
./premake5.exe --windows-vc-build --disable-static-build --with-debug-symbols vs2022
- name: Build
shell: cmd
run: |
msbuild .\make\windows\eepp.sln -m /p:Platform="x64" /p:Configuration="release"
- name: Set SDK version
id: sdk_version
shell: powershell
run: |
if ($env:GITHUB_REF -like "refs/tags/eepp-*") {
$tag = $env:GITHUB_REF -replace "^refs/tags/", ""
Add-Content $env:GITHUB_OUTPUT "version=$tag"
} else {
Add-Content $env:GITHUB_OUTPUT "version=nightly"
}
- name: Package eepp SDK
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
shell: powershell
run: |
.\projects\scripts\package_sdk.ps1 -Platform msvc -Version ${{ steps.sdk_version.outputs.version }}
- name: Upload SDK package
if: always()
uses: actions/upload-artifact@v4
with:
name: windows-eepp-sdk-x86_64-msvc
path: projects\windows\sdk\eepp-sdk-*.zip
- name: Publish nightly SDK package
if: github.ref == 'refs/heads/develop'
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.sdk_version.outputs.version }}
draft: false
prerelease: true
generate_release_notes: false
fail_on_unmatched_files: true
files: |
projects\windows\sdk\eepp-sdk-windows-x86_64-msvc-nightly.zip
- name: Publish stable release package
if: startsWith(github.ref, 'refs/tags/eepp-')
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.sdk_version.outputs.version }}
draft: false
prerelease: false
generate_release_notes: false
fail_on_unmatched_files: true
files: |
projects\windows\sdk\eepp-sdk-windows-x86_64-msvc-*.zip
- name: Install Mesa for software rendering
uses: f3d-app/install-mesa-windows-action@v1
with:
path: ${{ github.workspace }}/bin/unit_tests
- name: Enable crash dumps
shell: powershell
run: |
$dumpDir = (New-Item -ItemType Directory -Force -Path "bin\unit_tests\output").FullName
$dumpKey = "HKCU:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\eepp-unit_tests.exe"
New-Item -Path $dumpKey -Force | Out-Null
New-ItemProperty -Path $dumpKey -Name DumpFolder -PropertyType ExpandString -Value $dumpDir -Force | Out-Null
New-ItemProperty -Path $dumpKey -Name DumpType -PropertyType DWord -Value 2 -Force | Out-Null
New-ItemProperty -Path $dumpKey -Name DumpCount -PropertyType DWord -Value 2 -Force | Out-Null
- name: Unit Tests
shell: cmd
env:
GALLIUM_DRIVER: llvmpipe
run: |
bin\unit_tests\eepp-unit_tests.exe
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: windows-test-output
path: bin\unit_tests\output\*
- name: Upload crash symbols
if: failure()
uses: actions/upload-artifact@v4
with:
name: windows-crash-symbols
if-no-files-found: warn
path: |
bin\unit_tests\eepp-unit_tests.exe
bin\unit_tests\eepp-unit_tests.pdb
libs\windows\x86_64\eepp.dll
libs\windows\x86_64\eepp.pdb