Skip to content
27 changes: 15 additions & 12 deletions .yamato/Run IL2CPP Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Run IL2CPP Tests Against This Mono Branch

agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-prtools-bokken:latest
image: vm/il2cpp-gamecore:v1.1.0
flavor: b1.xlarge

variables:
Expand Down Expand Up @@ -35,26 +35,29 @@ commands:

git clone git@github.cds.internal.unity3d.com:unity/prtools.git

# Step 2 - clone unity/il2cpp into $env:PRTOOLS_BUILD_DIR\il2cpp (C:\buildslave\unity\il2cpp)
# Step 2 - clone unity/il2cpp into $env:YAMATO_WORK_DIR\il2cpp (C:\build\output\il2cpp)
- command: |
git config --global core.longpaths true
cd $env:PRTOOLS_BUILD_DIR
cd $env:YAMATO_WORK_DIR

git clone --recurse-submodules https://github.cds.internal.unity3d.com/unity/il2cpp.git il2cpp

# Step 3 - With working dir $env:UNITY_SOURCE_PRTOOLS_DIR (C:\buildslave\unity\build) run PRTools from $env:YAMATO_WORK_DIR\prtools (C:\build\output\prtools) (--test-mono-il2cpp-deps)
# pointing PRTools to the IL2CPP checkout we did above (in $env:PRTOOLS_BUILD_DIR\il2cpp (C:\buildslave\unity\il2cpp))
# Step 3 - With working dir $env:YAMATO_WORK_DIR\build (C:\build\output\build) run PRTools from $env:YAMATO_WORK_DIR\prtools (C:\build\output\prtools) (--test-mono-il2cpp-deps)
# pointing PRTools to the IL2CPP checkout we did above (in $env:YAMATO_WORK_DIR\il2cpp (C:\build\output\il2cpp))
# We don't push the IL2CPP test-mono-il2cpp-deps-***** branch this creates, since we're just going to run tests on it 'locally' (see the --bee-update-verification step below)
- command: |

cd $env:UNITY_SOURCE_PRTOOLS_DIR
cmd /v /c dotnet run --project $env:YAMATO_WORK_DIR\prtools\PRTools\PRTools.csproj --test-mono-il2cpp-deps=$env:YAMATO_SOURCE_DIR/stevedore/artifactid.txt --backport=$env:BACKPORT_BRANCH --custom-il2cpp-repo-path=$env:PRTOOLS_BUILD_DIR/il2cpp --github-api-token=$env:IL2CPP_GITHUB_TOKEN --yamato-api-token=$env:YAMATO_TOKEN --yamato-long-lived-token --il2cpp-deps-manifest-file=il2cpp-deps.stevedore --yamato-owner-email=$env:YAMATO_OWNER_EMAIL --no-slack --no-push
if (-not (Test-Path -Path "$env:YAMATO_WORK_DIR\build")) {
New-Item -Path "$env:YAMATO_WORK_DIR\build" -ItemType Directory -Force
}
cd "$env:YAMATO_WORK_DIR\build"
cmd /v /c dotnet run --project $env:YAMATO_WORK_DIR\prtools\PRTools\PRTools.csproj --test-mono-il2cpp-deps=$env:YAMATO_SOURCE_DIR/stevedore/artifactid.txt --backport=$env:BACKPORT_BRANCH --custom-il2cpp-repo-path=$env:YAMATO_WORK_DIR/il2cpp --github-api-token=$env:IL2CPP_GITHUB_TOKEN --yamato-api-token=$env:YAMATO_TOKEN --yamato-long-lived-token --il2cpp-deps-manifest-file=il2cpp-deps.stevedore --yamato-owner-email=$env:YAMATO_OWNER_EMAIL --no-slack --no-push
if ($LASTEXITCODE -ne 0) { echo "PRTools failed"; exit $LASTEXITCODE }

# Step 4 - Copy stevedore.conf:
- command: |

cd $env:PRTOOLS_BUILD_DIR/il2cpp
cd "$env:YAMATO_WORK_DIR\il2cpp"
echo "Current Git state:"
git log -1
git submodule update --init --recursive
Expand All @@ -63,7 +66,7 @@ commands:
# Step 5 - Run bootstrap:
- command: |

cd $env:PRTOOLS_BUILD_DIR/il2cpp
cd "$env:YAMATO_WORK_DIR\il2cpp"
.\bootstrap.cmd

timeout: 0
Expand All @@ -72,7 +75,7 @@ commands:
# Step 6 - Run bee-update-verification
- command: |

cd $env:PRTOOLS_BUILD_DIR/il2cpp
cd "$env:YAMATO_WORK_DIR\il2cpp"

perl test.pl --build-machine --bee-update-verification; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

Expand All @@ -86,7 +89,7 @@ after:
New-Item -Path "$env:YAMATO_SOURCE_DIR\build\ReportedArtifacts" -ItemType Directory
}

Copy-Item -Path "$env:PRTOOLS_BUILD_DIR\il2cpp\build\ReportedArtifacts\*" -Destination "$env:YAMATO_SOURCE_DIR\build\ReportedArtifacts" -Recurse -ErrorAction SilentlyContinue
Copy-Item -Path "$env:YAMATO_WORK_DIR\il2cpp\build\ReportedArtifacts\*" -Destination "$env:YAMATO_SOURCE_DIR\build\ReportedArtifacts" -Recurse -ErrorAction SilentlyContinue

$licenseLogPath = Join-Path -Path $Env:HOMEDRIVE$Env:HOMEPATH -ChildPath "AppData\Local\Unity\Unity.Licensing.Client.log"
if (Test-Path -Path $licenseLogPath) {
Expand All @@ -95,7 +98,7 @@ after:

if (-not (Test-Path -Path "$env:YAMATO_SOURCE_DIR\build\CrashDumps")) { New-Item -Path "$env:YAMATO_SOURCE_DIR\build\CrashDumps" -ItemType Directory }
Copy-Item -Path "C:\CrashDump\*" -Destination "$env:YAMATO_SOURCE_DIR\build\CrashDumps" -Recurse -ErrorAction SilentlyContinue
Copy-Item -Path "$env:PRTOOLS_BUILD_DIR\il2cpp\CrashDumps\*" -Destination "$env:YAMATO_SOURCE_DIR\build\CrashDumps" -Recurse -ErrorAction SilentlyContinue
Copy-Item -Path "$env:YAMATO_WORK_DIR\il2cpp\CrashDumps\*" -Destination "$env:YAMATO_SOURCE_DIR\build\CrashDumps" -Recurse -ErrorAction SilentlyContinue

artifacts:
crash_dumps:
Expand Down
2 changes: 1 addition & 1 deletion .yamato/Update Il2cpp-deps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Update Il2cpp-deps'
agent:
type: Unity::VM
image: platform-foundation/windows-vs2019-prtools-bokken:latest
image: vm/prtools-windows-vs2019:v1.1.0
flavor: b1.xlarge
variables:
MONO_REV: "latest"
Expand Down