android action #22
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: Build Android UE.5.0 | |
on: | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**/README.md' | |
- '**/gitignore' | |
workflow_dispatch: | |
jobs: | |
build-ndk-android: | |
uses: ./.github/workflows/build-ndk-android.yml | |
build-android-50: | |
runs-on: [ self-hosted, Windows, X64, w10-1344 ] | |
needs: [ build-ndk-android ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: git-update-dependecies | |
run: git submodule update --init --recursive | Write-Host | |
- name: Find NDK SHA | |
run: | | |
$INWORLD_NDK_SHA=(git submodule status).Trim().Split()[0] | |
echo $INWORLD_NDK_SHA | |
Add-Content -Path ${env:GITHUB_ENV} -Value "INWORLD_NDK_SHA=$INWORLD_NDK_SHA" | |
- uses: actions/cache/restore@v3 | |
id: ndk-cache-android | |
with: | |
path: InworldAI\inworld-ndk\build\Package | |
key: macOS-ndk-cache-android-${{ env.INWORLD_NDK_SHA }} | |
fail-on-cache-miss: true | |
- name: Copy NDK | |
run: | | |
$process = Start-Process -FilePath "C:\Program Files\Python310\Python.exe" -Wait -NoNewWindow -PassThru -ArgumentList InworldAI\Source\ThirdParty\Inworld\dev-tools\ndk-util.py,--copy | |
if($process.ExitCode -ne 0) | |
{ | |
exit 1 | |
} | |
- run: mkdir -p TestPrj-5.2 | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'TestPrj-5.2' | |
path: 'TestPrj-5.2' | |
- name: Copy Plugins & Remove Assets | |
shell: pwsh | |
run: | | |
Remove-Item "InworldAI\Content\*" -Recurse -ErrorAction SilentlyContinue | |
Remove-Item "TestPrj-5.2\TestInworldFPS\Plugins\InworldAI" -Recurse -ErrorAction SilentlyContinue | |
Remove-Item "TestPrj-5.2\TestInworldFPS\Plugins\InworldMetahuman" -Recurse -ErrorAction SilentlyContinue | |
Remove-Item "TestPrj-5.2\TestInworldFPS\Plugins\InworldRPM" -Recurse -ErrorAction SilentlyContinue | |
Copy-Item -Path "InworldAI" -Destination "TestPrj-5.2\TestInworldFPS\Plugins\InworldAI" -Recurse | |
Copy-Item -Path "InworldMetahuman" -Destination "TestPrj-5.2\TestInworldFPS\Plugins\InworldMetahuman" -Recurse | |
Copy-Item -Path "InworldRPM" -Destination "TestPrj-5.2\TestInworldFPS\Plugins\InworldRPM" -Recurse | |
- name: BuildGame-Android-50 | |
shell: pwsh | |
run: | | |
[string]$UEPath = "C:\Program Files\Epic Games\UE_5.2" | |
[string]$ProjectPath = "$pwd" | |
Start-Process -FilePath "$UEPath\Engine\Build\BatchFiles\RunUAT.bat" -ArgumentList BuildGame,-Project="$ProjectPath\TestPrj-5.2\TestInworldFPS\TestInworldFPS.uproject",-platform=Android,-notools,-configuration=Development+Shipping," > BuildGameLog.txt" -Wait -NoNewWindow -PassThru | |
cat BuildGameLog.txt | |
if (Select-String -Path BuildGameLog.txt -Pattern "BUILD SUCCESSFUL" -SimpleMatch -Quiet) | |
{ | |
exit 0 | |
} | |
else | |
{ | |
exit 1 | |
} | |
- name: BuildPlugin-Android-50 | |
shell: pwsh | |
run: | | |
[string]$UEPath = "C:\Program Files\Epic Games\UE_5.2" | |
[string]$ProjectPath = "$pwd" | |
Start-Process -FilePath "$UEPath\Engine\Build\BatchFiles\RunUAT.bat" -ArgumentList BuildPlugin,-plugin="$ProjectPath\TestPrj-5.2\TestInworldFPS\Plugins\InworldAI\InworldAI.uplugin",-TargetPlatforms=Android,-package="$ProjectPath\PluginBuild"," > BuildPluginLog.txt" -Wait -NoNewWindow -PassThru | |
cat BuildPluginLog.txt | |
if (Select-String -Path BuildPluginLog.txt -Pattern "BUILD SUCCESSFUL" -SimpleMatch -Quiet) | |
{ | |
exit 0 | |
} | |
else | |
{ | |
exit 1 | |
} |