Skip to content

Check Parallel Build #66

Check Parallel Build

Check Parallel Build #66

name: Check Parallel Build
on:
pull_request:
paths:
- '.github/workflows/check-parallel-build.yml'
- 'build/tools/ParallelBuildAuditor/**'
- 'build/Stride.slnx'
- 'sources/**/*.csproj'
- 'sources/**/*.targets'
- 'sources/**/*.props'
- 'Directory.Build.props'
- 'Directory.Build.targets'
types: [opened, synchronize, reopened, ready_for_review]
schedule:
# 04:17 UTC daily — offset off top-of-hour to avoid GitHub Actions cron load spikes.
- cron: '17 4 * * *'
workflow_dispatch:
jobs:
check-parallel-build:
# Fork-friendly: PR gated on STRIDE_ENABLE_PUSH_CI, schedule on STRIDE_ENABLE_SCHEDULED_CI.
# workflow_dispatch always runs.
if: >
github.event_name == 'workflow_dispatch'
|| (github.event_name == 'pull_request' && github.event.pull_request.draft == false && vars.STRIDE_ENABLE_PUSH_CI == 'true')
|| (github.event_name == 'schedule' && vars.STRIDE_ENABLE_SCHEDULED_CI == 'true')
name: Detect property-leak duplicate builds
runs-on: windows-2025-vs2026
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Build ParallelBuildAuditor
run: dotnet build build\tools\ParallelBuildAuditor\ParallelBuildAuditor.csproj -c Release -nologo -v:m
- name: Build Stride.slnx (capturing binlog)
# Continue on build error: even partial binlog data is enough for leak detection
# (and Stride.slnx contains native vcxproj projects that may fail under dotnet build).
continue-on-error: true
run: |
dotnet build build\Stride.slnx `
-bl:parallel-audit.binlog `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:StrideSkipUnitTests=true `
-p:StrideSkipAutoPack=true
- name: Run ParallelBuildAuditor
run: dotnet run --project build\tools\ParallelBuildAuditor\ParallelBuildAuditor.csproj -c Release --no-build -- parallel-audit.binlog
- name: Upload binlog on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: parallel-audit-binlog
path: parallel-audit.binlog
retention-days: 14