-
Notifications
You must be signed in to change notification settings - Fork 5
106 lines (101 loc) · 4.51 KB
/
Copy pathci.yml
File metadata and controls
106 lines (101 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CI_PACKAGE_VERSION: 0.3.0-alpha.4
jobs:
dotnet:
name: .NET (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet
with:
global-json-file: global.json
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: npm
cache-dependency-path: protocol/runtime/v1/typescript/package-lock.json
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Test release scripts
shell: pwsh
run: ./tools/Test-ReleaseScripts.ps1 -Version $env:CI_PACKAGE_VERSION
- name: Test generated Runtime Protocol SDKs
shell: pwsh
run: ./tools/Test-RuntimeProtocolSdks.ps1
- name: Restore locked dependencies
run: dotnet restore OpenGameAgent.sln --locked-mode
- name: Build
run: dotnet build OpenGameAgent.sln -c Release --no-restore
- name: Test
run: dotnet test OpenGameAgent.sln -c Release --no-build --no-restore
- name: Verify formatting
run: dotnet format OpenGameAgent.sln --verify-no-changes --no-restore
- name: Pack libraries
if: runner.os == 'Linux'
shell: pwsh
run: ./tools/Pack-NuGet.ps1 -PackageVersion $env:CI_PACKAGE_VERSION
- name: Verify packed asset payloads
if: runner.os == 'Linux'
shell: pwsh
run: ./tools/Test-FrozenReleaseAssets.ps1 -CandidateDirectory artifacts/nuget -FrozenDirectory artifacts/nuget
- name: Verify clean NuGet consumer
if: runner.os == 'Linux'
shell: pwsh
run: ./tools/Test-NuGetPackages.ps1 -PackageVersion $env:CI_PACKAGE_VERSION -ExpectedRepositoryCommit $env:GITHUB_SHA
- name: Validate public tree
shell: pwsh
run: ./tools/Test-PublicTree.ps1
engine-packages:
name: Engine package gates
runs-on: windows-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet
with:
global-json-file: global.json
- name: Verify store listings and media
shell: pwsh
run: ./tools/Test-StoreListings.ps1
- name: Build Unity compile stubs
shell: pwsh
run: dotnet build tests/OpenGameAgent.Unity.Stubs/OpenGameAgent.Unity.Stubs.csproj -c Release -o artifacts/unity-stubs
- name: Verify Unity package
shell: pwsh
run: ./engines/unity/test-package.ps1 -UnityManagedDir artifacts/unity-stubs
- name: Verify Unreal source plugin
shell: pwsh
run: ./engines/unreal/test-package.ps1
- name: Download Godot .NET
shell: pwsh
run: |
$archive = Join-Path $env:RUNNER_TEMP 'godot.zip'
Invoke-WebRequest -Uri 'https://github.com/godotengine/godot/releases/download/4.7.1-stable/Godot_v4.7.1-stable_mono_win64.zip' -OutFile $archive -MaximumRetryCount 4 -RetryIntervalSec 5
$actual = (Get-FileHash -LiteralPath $archive -Algorithm SHA512).Hash.ToLowerInvariant()
$expected = 'aa04876c7932c2e6807233e6908da4045e904781a83dc3c793c34ba71c9f66292eb4da82aa55a6b8694fccf856f8c244c7709cfba20405066445daf9c2749b71'
if ($actual -ne $expected) { throw 'Godot archive checksum mismatch.' }
Expand-Archive -LiteralPath $archive -DestinationPath (Join-Path $env:RUNNER_TEMP 'godot')
- name: Verify Godot package and editor
shell: pwsh
run: |
$root = Join-Path $env:RUNNER_TEMP 'godot'
$editor = Get-ChildItem -LiteralPath $root -Recurse -Filter '*console.exe' | Select-Object -First 1 -ExpandProperty FullName
$sharp = Split-Path -Parent (Get-ChildItem -LiteralPath $root -Recurse -Filter GodotSharp.dll | Where-Object FullName -like '*Api*Debug*' | Select-Object -First 1 -ExpandProperty FullName)
./engines/godot/test-package.ps1 -GodotSharpDir $sharp
./engines/godot/test-engine.ps1 -Godot $editor -GodotSharpDir $sharp