name: Synthetic recompilation on: workflow_call: workflow_dispatch: permissions: contents: read jobs: windows: name: Windows runtime (synthetic DOL) runs-on: windows-latest timeout-minutes: 60 steps: - uses: actions/checkout@v7 with: persist-credentials: false submodules: recursive - uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' # Cache downloads only. Preparation still validates pins, and every run # compiles current Aurora, runtime, and generated sources from scratch. - uses: actions/cache@v5 with: path: Launcher/artifacts/downloads key: windows-recomp-downloads-${{ hashFiles('Launcher/Prepare-PortableTools.ps1', 'Launcher/Prepare-Dependencies.ps1') }} # Install sccache. - name: Run sccache-action uses: mozilla/sccache-action@v0.0.11 # Tell CMake to use sccache and use GitHub's API. - name: Configure sccache environment shell: pwsh run: | "SCCACHE_GHA_ENABLED=true" | Add-Content -Path $env:GITHUB_ENV "ACTIONS_CACHE_SERVICE_V2=on" | Add-Content -Path $env:GITHUB_ENV "CMAKE_C_COMPILER_LAUNCHER=$env:SCCACHE_PATH" | Add-Content -Path $env:GITHUB_ENV "CMAKE_CXX_COMPILER_LAUNCHER=$env:SCCACHE_PATH" | Add-Content -Path $env:GITHUB_ENV - name: Prepare the shipped Windows toolchain shell: pwsh run: ./Launcher/Prepare-PortableTools.ps1 - name: Build and run Windows host-platform tests shell: pwsh run: | $tools = Join-Path $PWD 'Launcher/artifacts/portable-tools' $env:PATH = "$tools/llvm-mingw/bin;$tools/CMake/bin;$tools/Ninja;$env:PATH" cmake -S runtime -B build-platform -G Ninja ` -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ` -DMKW_BUILD_PRODUCTS=OFF -DMKW_PLATFORM_TESTS_ONLY=ON if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } cmake --build build-platform --parallel 3 if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } ctest --test-dir build-platform --output-on-failure if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - name: Prepare pinned native dependencies shell: pwsh run: ./Launcher/Prepare-Dependencies.ps1 # Expose cache token context to the build script. - name: Translate, compile the full runtime, and link shell: pwsh run: ./Launcher/Test-Recompilation.ps1 -Parallel 4 # Print cache results (even if the build fails) - name: Show sccache stats if: always() shell: pwsh run: sccache --show-stats