Diag: trace embedded Rivet crash phases #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rivet Windows Experiment | |
| on: | |
| push: | |
| branches: [experiment/taskly-rivet] | |
| paths: | |
| - 'apps/windows/**' | |
| - 'racket/**' | |
| - 'rivet.rktd' | |
| - '.github/workflows/rivet-windows.yml' | |
| pull_request: | |
| paths: | |
| - 'apps/windows/**' | |
| - 'racket/**' | |
| - 'rivet.rktd' | |
| - '.github/workflows/rivet-windows.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: rivet-windows-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RIVET_COMMIT: fe01374f1219277e88a33801e8f3cef914e3e79f | |
| jobs: | |
| windows: | |
| name: WinUI Native + embedded Rivet | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Build native fallback mode | |
| shell: pwsh | |
| run: dotnet build apps/windows/Taskly/Taskly.csproj -c Release -p:Platform=x64 | |
| - name: Set up Racket CS | |
| uses: Bogdanp/setup-racket@v1.15 | |
| with: | |
| architecture: x64 | |
| distribution: full | |
| variant: CS | |
| version: '9.3' | |
| - name: Install pinned Rivet | |
| shell: pwsh | |
| run: | | |
| $rivet = Join-Path $env:RUNNER_TEMP 'rivet' | |
| git clone https://github.com/turinglambdaai/rivet.git $rivet | |
| git -C $rivet checkout $env:RIVET_COMMIT | |
| raco pkg install --auto --no-docs --name rivet --link $rivet | |
| "RIVET_ROOT=$rivet" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Build Taskly embedded Racket bundle | |
| shell: pwsh | |
| run: raco rivet build-dotnet | |
| - name: Build WinUI Rivet mode | |
| shell: pwsh | |
| run: | | |
| dotnet clean apps/windows/Taskly/Taskly.csproj -c Release -p:Platform=x64 | |
| dotnet build apps/windows/Taskly/Taskly.csproj ` | |
| -c Release ` | |
| -p:Platform=x64 ` | |
| -p:UseRivetBackend=true ` | |
| -p:RivetRoot="$env:RIVET_ROOT" | |
| - name: Verify embedded runtime layout | |
| shell: pwsh | |
| run: | | |
| $exe = Get-ChildItem 'apps/windows/Taskly/bin' -Recurse -Filter 'Taskly.exe' | | |
| Sort-Object LastWriteTime -Descending | | |
| Select-Object -First 1 | |
| if ($null -eq $exe) { throw 'Taskly.exe was not produced' } | |
| $out = $exe.Directory.FullName | |
| if (-not (Test-Path (Join-Path $out 'rivet_native.dll'))) { | |
| throw 'rivet_native.dll is missing beside Taskly.exe' | |
| } | |
| $racket = Get-ChildItem $out -Filter '*racketcs*.dll' | Select-Object -First 1 | |
| if ($null -eq $racket) { throw 'Racket CS runtime DLL is missing beside Taskly.exe' } | |
| if (-not (Test-Path (Join-Path $out 'rivet/res/core.zo'))) { | |
| throw 'compiled Taskly Racket backend is missing from output' | |
| } | |
| foreach ($boot in @('petite.boot', 'scheme.boot', 'racket.boot')) { | |
| if (-not (Test-Path (Join-Path $out "rivet/runtime/$boot"))) { | |
| throw "$boot is missing from Taskly output" | |
| } | |
| } | |
| "TASKLY_RIVET_EXE=$($exe.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| Write-Host "Embedded Taskly output: $out" | |
| - name: Run Taskly embedded runtime smoke | |
| shell: pwsh | |
| run: | | |
| $log = Join-Path $env:RUNNER_TEMP 'taskly-rivet-smoke.log' | |
| Remove-Item $log -ErrorAction SilentlyContinue | |
| $env:TASKLY_RIVET_SMOKE_LOG = $log | |
| $process = Start-Process ` | |
| -FilePath $env:TASKLY_RIVET_EXE ` | |
| -ArgumentList '__rivet-smoke' ` | |
| -Wait ` | |
| -PassThru | |
| Write-Host '--- Taskly embedded smoke phases ---' | |
| if (Test-Path $log) { | |
| Get-Content $log | |
| } else { | |
| Write-Host '(no phase log was produced)' | |
| } | |
| Write-Host '--- end smoke phases ---' | |
| if ($process.ExitCode -ne 0) { | |
| throw ('Taskly embedded Rivet smoke failed with exit code {0} (0x{1:X8})' -f ` | |
| $process.ExitCode, ([uint32]$process.ExitCode)) | |
| } | |
| Write-Host 'Taskly embedded Rivet smoke completed successfully.' |