Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci tests #4

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/actions/platform-autodiscovery/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Build AutoDiscovery"
description: Builds the platform-specific auto-discovery libraries.
inputs:
architecture:
description: "Architecture to build; one of 'x86' or 'x64'"
required: true
project-suffix:
description: "Project suffix to build; one of 'Win32' or 'Win64'"
required: true
configuration:
description: "Configuration to build; one of 'Debug' or 'Release'"
required: true
artifact-name:
description: "Artifact name to upload for the resulting file"
required: true
runs:
using: composite
steps:
- name: Download .NET SDK
uses: actions/download-artifact@v4
with:
name: dotnet-sdk-windows
- name: Build AutoDiscovery
shell: pwsh
run: |
dotnet `
msbuild `
-restore `
-p:RuntimeIdentifier=win-${{ inputs.architecture }} `
-p:Configuration=${{ inputs.configuration }} `
-p:Platform=${{ inputs.architecture }} `
"-p:BaseUetVersion=${env:UET_PACKAGE_VERSION}" `
"-p:PackageVersion=${env:UET_PACKAGE_VERSION}" `
UET/Redpoint.AutoDiscovery.${{ inputs.project-suffix }}/Redpoint.AutoDiscovery.${{ inputs.project-suffix }}.csproj
exit $LastExitCode
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
if-no-files-found: error
path: |
UET/Redpoint.AutoDiscovery.${{ inputs.project-suffix }}/bin/${{ inputs.architecture }}/${{ inputs.configuration }}/${{ env.UET_PACKAGE_VERSION }}/
144 changes: 144 additions & 0 deletions .github/workflows/uet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Unreal Engine Tool

on:
push:
branches: "*"
pull_request:
branches: [ "main" ]

env:
UET_FRAMEWORK_TARGET: net8.0
UET_DOTNET_WIN_DL: https://download.visualstudio.microsoft.com/download/pr/6902745c-34bd-4d66-8e84-d5b61a17dfb7/e61732b00f7e144e162d7e6914291f16/dotnet-sdk-8.0.101-win-x64.zip
UET_DOTNET_MAC_DL: https://download.visualstudio.microsoft.com/download/pr/ef083c06-7aee-4a4f-b18b-50c9a8990753/e206864e7910e81bbd9cb7e674ff1b4c/dotnet-sdk-8.0.101-osx-arm64.tar.gz
UET_DOTNET_LINUX_DL: https://download.visualstudio.microsoft.com/download/pr/9454f7dc-b98e-4a64-a96d-4eb08c7b6e66/da76f9c6bc4276332b587b771243ae34/dotnet-sdk-8.0.101-linux-x64.tar.gz
UET_DOTNET_WIN_PATH: ./.dotnet-net8.0/dotnet/dotnet.exe
UET_DOTNET_MAC_PATH: ./.dotnet-net8.0/dotnet/dotnet
UET_DOTNET_LINUX_PATH: ./.dotnet-net8.0/dotnet/dotnet

jobs:
timestamp:
name: "Timestamp"
runs-on: ubuntu-latest
steps:
- name: Generate Timestamp
shell: pwsh
run: |
$Timestamp = ([DateTime]::UtcNow)
$PackageVersion = "$($Timestamp.Year).$($Timestamp.DayOfYear + 1000).$(($Timestamp.Hour * 60) + $Timestamp.Minute)"
Set-Content -NoNewline -Path "$env:GITHUB_ENV" -Value "UET_PACKAGE_VERSION=$($PackageVersion)"

download-dotnet-windows:
name: "Download .NET SDK for Windows"
runs-on: windows-latest
steps:
- name: Cache .NET SDK
id: cache-sdk
uses: actions/cache@v4
with:
key: dotnet-sdk-windows-${{ env.UET_FRAMEWORK_TARGET }}
restore-keys: dotnet-sdk-windows-${{ env.UET_FRAMEWORK_TARGET }}
path: .dotnet-${{ env.UET_FRAMEWORK_TARGET }}
- if: ${{ steps.cache-sdk.outputs.cache-hit != 'true' }}
name: Download .NET SDK
shell: pwsh
run: |
if (!(Test-Path .dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet\dotnet-extracted)) {
if (Test-Path ".dotnet-${env:UET_FRAMEWORK_TARGET}") {
Remove-Item -Recurse -Force ".dotnet-${env:UET_FRAMEWORK_TARGET}"
}
Write-Host "Setting up .NET SDK..."
New-Item -ItemType Directory ".dotnet-${env:UET_FRAMEWORK_TARGET}" | Out-Null
curl.exe -L -o ".dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet.zip" "${env:UET_DOTNET_WIN_DL}"
if ($LastExitCode -ne 0) {
exit $LastExitCode
}
Expand-Archive -Path ".dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet.zip" -DestinationPath ".dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet" -Force | Out-Null
Set-Content -Path .dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet\dotnet-extracted -Value "done"
}
- name: Add .NET SDK to PATH
shell: pwsh
run: |
Add-Content -Path "${env:GITHUB_PATH}" -Value ".dotnet-${env:UET_FRAMEWORK_TARGET}\dotnet"
- name: Upload .NET SDK
uses: actions/upload-artifact@v4
with:
name: dotnet-sdk-windows
if-no-files-found: error
path: |
.dotnet-${{ env.UET_FRAMEWORK_TARGET }}

build-autodiscovery-win-debug-x64:
name: "Build AutoDiscovery Win Debug x64"
runs-on: windows-latest
needs:
- download-dotnet-windows
- timestamp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build AutoDiscovery
uses: ./.github/actions/platform-autodiscovery
with:
architecture: x64
project-suffix: Win64
configuration: Debug
artifact-name: autodiscovery-win-debug-x64

build-autodiscovery-win-release-x64:
name: "Build AutoDiscovery Win Release x64"
runs-on: windows-latest
needs:
- download-dotnet-windows
- timestamp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build AutoDiscovery
uses: ./.github/actions/platform-autodiscovery
with:
architecture: x64
project-suffix: Win64
configuration: Release
artifact-name: autodiscovery-win-release-x64

build-autodiscovery-win-debug-x86:
name: "Build AutoDiscovery Win Debug x86"
runs-on: windows-latest
needs:
- download-dotnet-windows
- timestamp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build AutoDiscovery
uses: ./.github/actions/platform-autodiscovery
with:
architecture: x86
project-suffix: Win32
configuration: Debug
artifact-name: autodiscovery-win-debug-x86

build-autodiscovery-win-release-x86:
name: "Build AutoDiscovery Win Release x86"
runs-on: windows-latest
needs:
- download-dotnet-windows
- timestamp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build AutoDiscovery
uses: ./.github/actions/platform-autodiscovery
with:
architecture: x86
project-suffix: Win32
configuration: Release
artifact-name: autodiscovery-win-release-x86
Loading