If the RZFS link folder is somehow not a symbolic link, recursive del… #256
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
name: Unreal Engine Tool | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
UET_FRAMEWORK_TARGET: net8.0 | |
UET_BUILDING_ON_BUILD_SERVER: "true" | |
jobs: | |
timestamp: | |
name: "Timestamp" | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: timestamp | |
name: Generate Timestamp | |
shell: pwsh | |
run: | | |
$Timestamp = ([DateTime]::UtcNow) | |
$PackageVersion = "$($Timestamp.Year).$($Timestamp.DayOfYear + 1000).$(($Timestamp.Hour * 60) + $Timestamp.Minute)" | |
Set-Content -NoNewline -Path "package.version" -Value "$($PackageVersion)" | |
Set-Content -NoNewline -Path "$env:GITHUB_OUTPUT" -Value "version=$($PackageVersion)" | |
- name: Upload Timestamp | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: timestamp | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
test-stringenum-trimmed: | |
name: "Test StringEnum Trimmed" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build and Test | |
shell: pwsh | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang zlib1g-dev dotnet-sdk-8.0 | |
dotnet publish /p:TargetFramework=${{ env.UET_FRAMEWORK_TARGET }} -c Release -r linux-x64 UET/Redpoint.StringEnum.TrimTests/Redpoint.StringEnum.TrimTests.csproj | |
if ($LastExitCode -ne 0) { | |
Write-Host "dotnet build (Redpoint.StringEnum.TrimTests.csproj) failed with exit code $LastExitCode" | |
exit $LastExitCode | |
} | |
UET/Redpoint.StringEnum.TrimTests/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/linux-x64/publish/Redpoint.StringEnum.TrimTests | |
if ($LastExitCode -ne 0) { | |
Write-Host "Redpoint.StringEnum.TrimTests failed with exit code $LastExitCode" | |
exit $LastExitCode | |
} | |
uefs-win: | |
name: "Build Windows UEFS" | |
runs-on: windows-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UEFS Client | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=win-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/Redpoint.Uefs.Client/Redpoint.Uefs.Client.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Build UEFS Daemon | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=win-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/Redpoint.Uefs.Daemon/Redpoint.Uefs.Daemon.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: uefs-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
uefs-mac: | |
name: "Build macOS UEFS" | |
runs-on: macos-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UEFS Client | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=osx-arm64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/Redpoint.Uefs.Client/Redpoint.Uefs.Client.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
# Ensure the thing we built will actually run... | |
./UET/Redpoint.Uefs.Client/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uefs --help | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Build UEFS Daemon | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=osx-arm64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/Redpoint.Uefs.Daemon/Redpoint.Uefs.Daemon.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: uefs-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
shim-win: | |
name: "Build Windows Shim" | |
runs-on: windows-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Shim | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=win-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet.shim/uet.shim.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
shim-mac: | |
name: "Build macOS Shim" | |
runs-on: macos-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Shim | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=osx-arm64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet.shim/uet.shim.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
shim-linux: | |
name: "Build Linux Shim" | |
runs-on: ubuntu-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Shim | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=linux-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet.shim/uet.shim.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
pass-1-win: | |
name: "Build Windows Pass 1" | |
runs-on: windows-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 1 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=win-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
pass-1-mac: | |
name: "Build macOS Pass 1" | |
runs-on: macos-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 1 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=osx-arm64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
# Ensure the thing we built will actually run... | |
./UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uet --help | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
pass-1-linux: | |
name: "Build Linux Pass 1" | |
runs-on: ubuntu-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 1 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=linux-x64 ` | |
-p:Configuration=Release ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
libs-win: | |
name: "Build and Test Libraries on Windows" | |
runs-on: windows-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Install WinFsp | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -Uri https://github.com/winfsp/winfsp/releases/download/v2.0/winfsp-2.0.23075.msi -UseBasicParsing -OutFile winfsp.msi -ProgressAction SilentlyContinue | |
$Process = Start-Process -FilePath "$env:SystemRoot\system32\msiexec.exe" -ArgumentList @("/i", "winfsp.msi", "/qn", "/norestart") -Verb runas -PassThru | |
$Process.WaitForExit() | |
- name: Build and Test Libraries on Windows | |
shell: pwsh | |
run: | | |
dotnet build -c Release "/p:PackageVersion=${env:UET_PACKAGE_VERSION}" UET/UET.sln | |
if ($LastExitCode -ne 0) { | |
Write-Host "dotnet build (UET.sln) failed with exit code $LastExitCode" | |
exit $LastExitCode | |
} | |
foreach ($Item in (Get-ChildItem UET -Filter *.Tests)) { | |
if (Test-Path "$($Item.FullName)/$($Item.Name).csproj") { | |
Write-Host "============ STARTING: $($Item.Name) ============" | |
dotnet test --logger:"console" --logger:"trx;LogFileName=$($Item.Name).test-result.trx" --results-directory "$((Get-Location).Path)\TestResults" "$($Item.FullName)/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/$($Item.Name).dll" | |
if ($LastExitCode -ne 0) { | |
Write-Host "============ FAILED: $($Item.Name) ============" | |
exit $LastExitCode | |
} | |
Write-Host "============ PASSED: $($Item.Name) ============" | |
} | |
} | |
- name: Upload Test Results | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: test-results | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Upload Packages | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: libs-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
# note: This doesn't run tests on macOS like we used to on GitLab, since the GitHub Runners | |
# seem to randomly stall when running xUnit tests. | |
libs-mac: | |
name: "Build Libraries on macOS" | |
runs-on: macos-latest | |
needs: | |
- timestamp | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build and Test Libraries on macOS | |
run: | | |
set -e | |
echo "Package version: $UET_PACKAGE_VERSION" | |
dotnet build -c Release /p:PackageVersion=$UET_PACKAGE_VERSION UET/UET.sln | |
pass-2-win: | |
name: "Build Windows Pass 2" | |
runs-on: windows-latest | |
needs: | |
- timestamp | |
- pass-1-win | |
- pass-1-mac | |
- pass-1-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Windows Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Linux Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 2 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=win-x64 ` | |
-p:Configuration=Release ` | |
-p:EmbeddingCrossPlatform=true ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
pass-2-mac: | |
name: "Build macOS Pass 2" | |
runs-on: macos-latest | |
needs: | |
- timestamp | |
- pass-1-win | |
- pass-1-mac | |
- pass-1-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Windows Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Linux Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 2 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=osx-arm64 ` | |
-p:Configuration=Release ` | |
-p:EmbeddingCrossPlatform=true ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
# Ensure the thing we built will actually run... | |
./UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uet --help | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
pass-2-linux: | |
name: "Build Linux Pass 2" | |
runs-on: ubuntu-latest | |
needs: | |
- timestamp | |
- pass-1-win | |
- pass-1-mac | |
- pass-1-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Windows Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Linux Pass 1 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-1-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Build UET Pass 2 | |
shell: pwsh | |
run: | | |
dotnet ` | |
msbuild ` | |
-restore ` | |
-t:Publish ` | |
-p:RuntimeIdentifier=linux-x64 ` | |
-p:Configuration=Release ` | |
-p:EmbeddingCrossPlatform=true ` | |
-p:UetSkipNuGetPackaging=true ` | |
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" ` | |
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" ` | |
UET/uet/uet.csproj | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
# Ensure the thing we built will actually run... | |
./UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/linux-x64/publish/uet --help | |
if ($LastExitCode -ne 0) { exit $LastExitCode } | |
- name: Upload Binaries | |
uses: ./.github/actions/upload-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
test-schema-generate: | |
name: "Test Schema Generation" | |
runs-on: windows-latest | |
if: github.ref != 'refs/heads/main' | |
needs: | |
- timestamp | |
- pass-2-win | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Windows Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download package.version | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: timestamp | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Test Schema Generation | |
shell: pwsh | |
run: | | |
UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uet.exe internal generate-json-schema ` | |
--output-path test-schema.json | |
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
publish-nuget: | |
name: "Publish to NuGet" | |
runs-on: windows-latest | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- timestamp | |
- libs-win | |
- libs-mac | |
- uefs-win | |
- uefs-mac | |
- shim-win | |
- shim-mac | |
- shim-linux | |
- pass-2-win | |
- pass-2-mac | |
- pass-2-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET SDK | |
uses: ./.github/actions/dotnet-sdk | |
with: | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download NuGet Packages | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: libs-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Publish Packages | |
shell: pwsh | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
run: | | |
dotnet ` | |
nuget ` | |
push ` | |
--source https://api.nuget.org/v3/index.json ` | |
--api-key $env:NUGET_API_KEY ` | |
(Get-ChildItem -Recurse -Filter "*.${env:UET_PACKAGE_VERSION}.nupkg" | % { $_.FullName }) | |
if ($LastExitCode -ne 0) { | |
Write-Host "dotnet push failed with exit code $LastExitCode" | |
exit $LastExitCode | |
} | |
publish-github: | |
name: "Publish to GitHub" | |
runs-on: windows-latest | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- timestamp | |
- libs-win | |
- libs-mac | |
- uefs-win | |
- uefs-mac | |
- shim-win | |
- shim-mac | |
- shim-linux | |
- pass-2-win | |
- pass-2-mac | |
- pass-2-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Windows UEFS | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: uefs-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Windows Shim | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Windows Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS UEFS | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: uefs-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS Shim | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download macOS Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-mac | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Linux Shim | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: shim-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download Linux Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Download package.version | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: timestamp | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Publish to GitHub | |
shell: pwsh | |
env: | |
UET_GITHUB_RELEASES_PAT: ${{ secrets.UET_GITHUB_RELEASES_PAT }} | |
run: | | |
UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uet.exe internal create-github-release ` | |
--version ${env:UET_PACKAGE_VERSION} ` | |
--file "uet.exe=UET for Windows=UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uet.exe" ` | |
--file "uefs.exe=UEFS Client for Windows=UET/Redpoint.Uefs.Client/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uefs.exe" ` | |
--file "uefs-daemon.exe=UEFS Daemon for Windows=UET/Redpoint.Uefs.Daemon/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uefs-daemon.exe" ` | |
--file "uet.shim.exe=UET Shim for Windows=UET/uet.shim/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/win-x64/publish/uet.exe" ` | |
--file "uet=UET for macOS=UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uet" ` | |
--file "uefs=UEFS Client for macOS=UET/Redpoint.Uefs.Client/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uefs" ` | |
--file "uefs-daemon=UEFS Daemon for macOS=UET/Redpoint.Uefs.Daemon/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uefs-daemon" ` | |
--file "uet.shim=UET Shim for macOS=UET/uet.shim/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/osx-arm64/publish/uet" ` | |
--file "uet.linux=UET for Linux=UET/uet/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/linux-x64/publish/uet" ` | |
--file "uet.shim.linux=UET Shim for Linux=UET/uet.shim/bin/Release/${{ env.UET_FRAMEWORK_TARGET }}/linux-x64/publish/uet" ` | |
--file "package.version=Version File=package.version" | |
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
publish-uefs-container: | |
name: "Publish UEFS Container" | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
needs: | |
- timestamp | |
- libs-win | |
- libs-mac | |
- uefs-win | |
- uefs-mac | |
- shim-win | |
- shim-mac | |
- shim-linux | |
- pass-2-win | |
- pass-2-mac | |
- pass-2-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Windows UEFS | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: uefs-win | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build UEFS Container | |
shell: pwsh | |
run: | | |
docker buildx create --name img-builder --use --platform windows/amd64 | |
docker buildx build --platform windows/amd64 --output=type=registry -f UET/Lib/Uefs/Kubernetes/Dockerfile -t "ghcr.io/redpointgames/uet/uefs:${env:UET_PACKAGE_VERSION}" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
docker buildx build --platform windows/amd64 --output=type=registry -f UET/Lib/Uefs/Kubernetes/Dockerfile -t "ghcr.io/redpointgames/uet/uefs:latest" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
publish-uet-container: | |
name: "Publish UET Container" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
needs: | |
- timestamp | |
- libs-win | |
- libs-mac | |
- uefs-win | |
- uefs-mac | |
- shim-win | |
- shim-mac | |
- shim-linux | |
- pass-2-win | |
- pass-2-mac | |
- pass-2-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Linux Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Log in to the Container registry | |
if: github.ref == 'refs/heads/main' | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build UET Container | |
if: github.ref != 'refs/heads/main' | |
shell: pwsh | |
run: | | |
docker buildx create --name img-builder-linux --use --platform linux/amd64 | |
docker buildx build --platform linux/amd64 --output=type=image -f UET/Lib/Container/linux.Dockerfile -t "ghcr.io/redpointgames/uet/uet:${env:UET_PACKAGE_VERSION}" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
docker buildx build --platform linux/amd64 --output=type=image -f UET/Lib/Container/linux.Dockerfile -t "ghcr.io/redpointgames/uet/uet:latest" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
- name: Publish UET Container | |
if: github.ref == 'refs/heads/main' | |
shell: pwsh | |
run: | | |
docker buildx create --name img-builder-linux --use --platform linux/amd64 | |
docker buildx build --platform linux/amd64 --output=type=registry -f UET/Lib/Container/linux.Dockerfile -t "ghcr.io/redpointgames/uet/uet:${env:UET_PACKAGE_VERSION}" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
docker buildx build --platform linux/amd64 --output=type=registry -f UET/Lib/Container/linux.Dockerfile -t "ghcr.io/redpointgames/uet/uet:latest" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
publish-uet-container-wine: | |
name: "Publish UET Container (with Wine)" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
needs: | |
- timestamp | |
- libs-win | |
- libs-mac | |
- uefs-win | |
- uefs-mac | |
- shim-win | |
- shim-mac | |
- shim-linux | |
- pass-2-win | |
- pass-2-mac | |
- pass-2-linux | |
env: | |
UET_PACKAGE_VERSION: ${{ needs.timestamp.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download Linux Pass 2 | |
uses: ./.github/actions/download-artifact | |
with: | |
UET_ARTIFACT_NAME: pass-2-linux | |
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | |
- name: Log in to the Container registry | |
if: github.ref == 'refs/heads/main' | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build UET Container | |
if: github.ref != 'refs/heads/main' | |
shell: pwsh | |
run: | | |
docker buildx create --name img-builder-linux --use --platform linux/amd64 | |
docker buildx build --platform linux/amd64 --output=type=image -f UET/Lib/Container/linux-wine.Dockerfile -t "ghcr.io/redpointgames/uet/uet:${env:UET_PACKAGE_VERSION}-wine" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
docker buildx build --platform linux/amd64 --output=type=image -f UET/Lib/Container/linux-wine.Dockerfile -t "ghcr.io/redpointgames/uet/uet:latest-wine" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
- name: Publish UET Container | |
if: github.ref == 'refs/heads/main' | |
shell: pwsh | |
run: | | |
docker buildx create --name img-builder-linux --use --platform linux/amd64 | |
docker buildx build --platform linux/amd64 --output=type=registry -f UET/Lib/Container/linux-wine.Dockerfile -t "ghcr.io/redpointgames/uet/uet:${env:UET_PACKAGE_VERSION}-wine" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . | |
docker buildx build --platform linux/amd64 --output=type=registry -f UET/Lib/Container/linux-wine.Dockerfile -t "ghcr.io/redpointgames/uet/uet:latest-wine" --build-arg UET_TARGET_FRAMEWORK=${{ env.UET_FRAMEWORK_TARGET }} . |