nullprt-nightly #3
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: nullprt-nightly | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| nightly-verify: | |
| name: nightly-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Detect toolchain | |
| id: detect | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| pwsh -File scripts/detect_toolchain.ps1 | |
| - name: Bootstrap verify (all OS) | |
| id: bootstrap | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| pwsh -ExecutionPolicy Bypass -File scripts/bootstrap_verify.ps1 | |
| - name: Cross compile test (all OS) | |
| id: cross | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| pwsh -ExecutionPolicy Bypass -File scripts/cross_compile_test.ps1 | |
| - name: Selfhost verify (all OS) | |
| id: selfhost | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| pwsh -ExecutionPolicy Bypass -File scripts/aegc1_selfhost_verify.ps1 | |
| - name: Script smoke and readiness (all OS) | |
| id: smoke | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| pwsh -File scripts/selfhost_readiness_report.ps1 | |
| pwsh -File tests/aegc1/run_tests.ps1 | |
| - name: Upload nightly reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-reports-${{ matrix.os }} | |
| path: | | |
| scripts/*.txt | |
| tests/aegc1/test_report.txt | |
| build/** | |
| if-no-files-found: warn | |
| - name: Nightly summary | |
| if: always() | |
| shell: pwsh | |
| run: | | |
| Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "## Nullprt Nightly Summary (${{ matrix.os }})" | |
| Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "" | |
| if (Test-Path "scripts/selfhost_readiness_report.txt") { | |
| Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```text' | |
| Get-Content "scripts/selfhost_readiness_report.txt" | Add-Content -Path $env:GITHUB_STEP_SUMMARY | |
| Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```' | |
| } | |
| publish-nightly-prerelease: | |
| name: publish-nightly-prerelease | |
| needs: nightly-verify | |
| if: always() && needs.nightly-verify.result == 'success' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download nightly artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: nightly-artifacts | |
| - name: Compose nightly metadata | |
| id: nightlymeta | |
| shell: bash | |
| run: | | |
| tag="nightly-$(date +%Y%m%d)" | |
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | |
| cat > NIGHTLY_NOTES.md <<EOF | |
| ${tag} | |
| - Automated nightly prerelease from workflow \`${GITHUB_WORKFLOW}\` | |
| - Includes CI reports and build artifacts from all nightly matrix jobs | |
| EOF | |
| - name: Publish nightly prerelease | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.nightlymeta.outputs.tag }} | |
| name: ${{ steps.nightlymeta.outputs.tag }} | |
| body_path: NIGHTLY_NOTES.md | |
| prerelease: true | |
| make_latest: false | |
| files: | | |
| nightly-artifacts/**/* |