Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/ci-selection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Select relevant checks
on:
workflow_call:
outputs:
host:
value: ${{ jobs.select.outputs.host }}
families:
value: ${{ jobs.select.outputs.families }}
rendering:
value: ${{ jobs.select.outputs.rendering }}
scene:
value: ${{ jobs.select.outputs.scene }}
packages:
value: ${{ jobs.select.outputs.packages }}
compare:
value: ${{ jobs.select.outputs.compare }}
comparisons:
value: ${{ jobs.select.outputs.comparisons }}
plan:
value: ${{ jobs.select.outputs.plan }}
permissions:
contents: read
jobs:
select:
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
host: ${{ steps.select.outputs.host }}
families: ${{ steps.select.outputs.families }}
rendering: ${{ steps.select.outputs.rendering }}
scene: ${{ steps.select.outputs.scene }}
packages: ${{ steps.select.outputs.packages }}
compare: ${{ steps.select.outputs.compare }}
comparisons: ${{ steps.select.outputs.comparisons }}
plan: ${{ steps.select.outputs.plan }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test selection and required-check gating
run: python3 -m unittest discover -s tests -p test_ci_changes.py
- id: select
run: python3 tools/ci_changes.py
12 changes: 5 additions & 7 deletions .github/workflows/nuget-preview.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
name: NuGet preview
on:
pull_request:
paths:
- 'src/**'
- 'eng/**'
- 'tests/nuget_consumer.py'
- 'Directory.Build.props'
- 'LICENSE'
- '.github/workflows/nuget-preview.yml'
push:
tags: ['nuget-preview-*']
branches: [main]
workflow_dispatch:
inputs:
publish:
Expand All @@ -19,7 +13,11 @@ on:
permissions:
contents: read
jobs:
changes:
uses: ./.github/workflows/ci-selection.yml
verify:
needs: changes
if: needs.changes.outputs.packages == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 20
outputs:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/progressive-textures.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: Progressive texture contracts
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
changes:
uses: ./.github/workflows/ci-selection.yml
contracts:
needs: changes
if: needs.changes.outputs.families == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
Expand All @@ -14,6 +23,5 @@ jobs:
with:
python-version: '3.12'
- run: python3 tests/progressive_fixtures.py
- run: python3 -m unittest discover -s tests -p test_progressive_textures.py
- run: dotnet run --project tests/TextureFamilies.Tests -c Debug
- run: dotnet run --project tests/TextureFamilies.Tests -c Release
215 changes: 152 additions & 63 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Packed scene in Dolphin
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
Expand All @@ -9,34 +10,55 @@ concurrency:
permissions:
contents: read
jobs:
validation:
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: 50
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: efda89f3e1ad50fe4cac20124ad8a89f75b1c002
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: Test ordered mesh pass contracts
run: |
dotnet run --project tests/OrderedMeshPasses.Tests -c Release
dotnet run --project tests/OrderedMeshPasses.Tests -c Release -p:HypercubeNativePasses=false
- name: Build and test packed assets, scheduler and GameCube executable
- 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: |
Expand All @@ -45,79 +67,129 @@ jobs:
vendor/sdk/tests/native_buffer_crc_test
- name: Build Dolphin validation container
run: docker build -t hypercube-dolphin -f tools/Dockerfile.dolphin .
- name: Build shared rendering integration sample
env:
CONFIGURATION: ${{ matrix.configuration }}
run: tools/build_rendering.sh
- 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: 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: Build performance comparison executable
if: matrix.configuration == 'Release'
env:
PERFORMANCE_SUITE: '1'
run: tools/build_validation.sh
- name: Run nine performance comparisons and progress checks
if: matrix.configuration == 'Release'
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-performance-Release/Game.dol
--suite performance --disc out/assets/world.iso
--logs out/dolphin-performance-Release --seconds 240
- name: Build frame-phase profiling executable
if: matrix.configuration == 'Release'
env:
PROFILING_SUITE: '1'
run: tools/build_validation.sh
- name: Run sixteen engine/SDK throughput comparisons
if: matrix.configuration == 'Release'
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-profiling-Release/Game.dol
--suite profiling --disc out/assets/world.iso
--logs out/dolphin-profiling-Release --seconds 360
- name: Build SDK follow-up profiling executable
if: matrix.configuration == 'Release'
- 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:
SDK_FOLLOWUP_SUITE: '1'
run: tools/build_validation.sh
- name: Run sixteen SDK wait and direct-read comparisons
if: matrix.configuration == 'Release'
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/dolphin_validation.py out/native-sdk-followup-Release/Game.dol
--suite sdk-followup --disc out/assets/world.iso
--logs out/dolphin-sdk-followup-Release --seconds 360
- name: Build texture follow-up profiling executable
if: matrix.configuration == 'Release'
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:
TEXTURE_FOLLOWUP_SUITE: '1'
run: tools/build_validation.sh
- name: Run sixteen clear, wait and aligned-read comparisons
if: matrix.configuration == 'Release'
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-texture-followup-Release/Game.dol
--suite texture-followup --disc out/assets/world.iso
--logs out/dolphin-texture-followup-Release --seconds 480
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-validation-${{ matrix.configuration }}
name: hypercube-${{ matrix.suite }}-Release
path: |
out/native-*/Game.dol
out/native-*/Game.elf
Expand All @@ -130,3 +202,20 @@ jobs:
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ namespaces remain unchanged. Hypercube is licensed under GPL-2.0-only, matching
DolphinDotNet. GameCube package builds require a compatible published SDK package.

Ordered transparent color/UV variants are available through [ordered mesh passes](docs/ordered-mesh-passes.md), with a portable published-SDK path and an opt-in native replay backend.

CI selects relevant checks from the whole PR diff and runs the full suite for
shared or unknown changes. See [CI selection](docs/ci-selection.md) for routing,
required-check behavior and forcing a full run.
Loading
Loading