Repository navigation
221 lines (216 loc) · 7.67 KB
/
Copy pathvalidation.yml
File metadata and controls
221 lines (216 loc) · 7.67 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
name: Packed scene in Dolphin
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: validation-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
changes:
uses: ./.github/workflows/ci-selection.yml
host:
name: host checks
needs: changes
if: needs.changes.outputs.host == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python3 tools/test_host.py
baseline-validation:
name: baseline validation (${{ matrix.configuration }})
needs: [changes, host]
if: needs.changes.outputs.scene == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
- id: sdk
run: echo "revision=$(cat .sdk-revision)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: capz/DolphinDotNet
ref: ${{ steps.sdk.outputs.revision }}
path: vendor/sdk
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build packed assets and GameCube executable
env:
CONFIGURATION: ${{ matrix.configuration }}
FIXTURE_RESOLUTION: '48'
HYPERCUBE_SKIP_HOST_TESTS: '1'
run: tools/build_validation.sh
- name: Verify native resource API ranges and checksums
run: |
make -C vendor/sdk/tests mesh_range_test native_buffer_crc_test
vendor/sdk/tests/mesh_range_test
vendor/sdk/tests/native_buffer_crc_test
- name: Build Dolphin validation container
run: docker build -t hypercube-dolphin -f tools/Dockerfile.dolphin .
- name: Boot the DOL and run all eleven scene comparisons
run: >-
docker run --rm --init --shm-size=512m --user "$(id -u):$(id -g)"
--mount "type=bind,src=$PWD,dst=/work" -w /work hypercube-dolphin
python3 tools/dolphin_validation.py out/native-${{ matrix.configuration }}/Game.dol
--disc out/assets/world.iso --logs out/dolphin-${{ matrix.configuration }} --seconds 240
- name: Upload executable, assets, measurements and rendered evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: hypercube-validation-${{ matrix.configuration }}
path: |
out/native-*/Game.dol
out/native-*/Game.elf
out/assets/
out/dolphin-*/*.csv
out/dolphin-*/*.md
out/dolphin-*/*.json
out/dolphin-*/*.png
out/dolphin-*/*.log
out/dolphin-*/user/Logs/
out/dolphin-*/user/Dump/Audio/
retention-days: 14
rendering:
name: rendering (${{ matrix.configuration }})
needs: [changes, host]
if: needs.changes.outputs.rendering == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
- id: sdk
run: echo "revision=$(cat .sdk-revision)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: capz/DolphinDotNet
ref: ${{ steps.sdk.outputs.revision }}
path: vendor/sdk
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build shared rendering integration sample
env:
CONFIGURATION: ${{ matrix.configuration }}
run: tools/build_rendering.sh
- name: Build Dolphin validation container
run: docker build -t hypercube-dolphin -f tools/Dockerfile.dolphin .
- name: Validate bounded rendering, dirty uploads and cover states in Dolphin
run: >-
docker run --rm --init --shm-size=512m --user "$(id -u):$(id -g)"
--mount "type=bind,src=$PWD,dst=/work" -w /work hypercube-dolphin
python3 tools/rendering_validation.py out/native-rendering-${{ matrix.configuration }}/Game.dol
--logs out/dolphin-rendering-${{ matrix.configuration }} --seconds 35
- name: Upload executable, assets, measurements and rendered evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: hypercube-rendering-${{ matrix.configuration }}
path: |
out/native-*/Game.dol
out/native-*/Game.elf
out/assets/
out/dolphin-*/*.csv
out/dolphin-*/*.md
out/dolphin-*/*.json
out/dolphin-*/*.png
out/dolphin-*/*.log
out/dolphin-*/user/Logs/
out/dolphin-*/user/Dump/Audio/
retention-days: 14
release-comparisons:
name: release comparisons (${{ matrix.suite }})
needs: [changes, host]
if: needs.changes.outputs.compare == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.changes.outputs.comparisons) }}
steps:
- uses: actions/checkout@v4
- id: sdk
run: echo "revision=$(cat .sdk-revision)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: capz/DolphinDotNet
ref: ${{ steps.sdk.outputs.revision }}
path: vendor/sdk
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build Release comparison executable
env:
CONFIGURATION: Release
FIXTURE_RESOLUTION: '48'
HYPERCUBE_SKIP_HOST_TESTS: '1'
run: env "${{ matrix.build_flag }}=1" tools/build_validation.sh
- name: Build Dolphin validation container
run: docker build -t hypercube-dolphin -f tools/Dockerfile.dolphin .
- name: Run comparison and progress checks
run: >-
docker run --rm --init --shm-size=512m --user "$(id -u):$(id -g)"
--mount "type=bind,src=$PWD,dst=/work" -w /work hypercube-dolphin
python3 tools/dolphin_validation.py out/native-${{ matrix.suite }}-Release/Game.dol
--suite ${{ matrix.suite }} --disc out/assets/world.iso
--logs out/dolphin-${{ matrix.suite }}-Release --seconds ${{ matrix.seconds }}
- name: Upload executable, assets, measurements and rendered evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: hypercube-${{ matrix.suite }}-Release
path: |
out/native-*/Game.dol
out/native-*/Game.elf
out/assets/
out/dolphin-*/*.csv
out/dolphin-*/*.md
out/dolphin-*/*.json
out/dolphin-*/*.png
out/dolphin-*/*.log
out/dolphin-*/user/Logs/
out/dolphin-*/user/Dump/Audio/
retention-days: 14
validation:
name: validation (${{ matrix.configuration }})
needs: [changes, host, baseline-validation, rendering, release-comparisons]
if: always()
runs-on: ubuntu-24.04
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Require every selected lane and allow only intentional skips
env:
CI_NEEDS: ${{ toJSON(needs) }}
run: python3 tools/ci_changes.py --check-results