ci-fresh-install #69
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: ci-fresh-install | |
| # Fresh install CI — validates the released mcpp binary via xlings. | |
| # Simulates a real first-time user on a clean machine (no caches). | |
| # | |
| # For each platform, tests every supported toolchain: | |
| # 1. mcpp new hello → mcpp run (basic project) | |
| # 2. mcpp build (build mcpp itself from source) | |
| # | |
| # This workflow tests released mcpp, not PR code. | |
| # It runs on release publish, manual trigger, and daily schedule. | |
| on: | |
| release: | |
| types: [ published ] | |
| workflow_dispatch: | |
| schedule: | |
| # Run daily at 06:00 UTC to catch issues from xlings/runner updates | |
| - cron: '0 6 * * *' | |
| concurrency: | |
| group: ci-fresh-install | |
| cancel-in-progress: false # use false to test in PRs, true to only test released mcpp | |
| jobs: | |
| # ────────────────────────────────────────────────────────────────── | |
| # Linux: gcc@16.1.0, musl-gcc@15.1.0, llvm@20.1.7 | |
| # ────────────────────────────────────────────────────────────────── | |
| linux-fresh: | |
| name: Linux fresh install | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings + mcpp | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v0.4.38 | |
| echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" | |
| - name: Install mcpp and config mirror | |
| run: | | |
| # The release tarball bundles a pkgindex snapshot frozen at | |
| # build time; refresh it so the workspace pin in .xlings.json | |
| # (latest mcpp) resolves. | |
| xlings update | |
| xlings install mcpp -y -g # install to global | |
| mcpp --version | |
| mcpp self config --mirror GLOBAL | |
| echo "mcpp debug info:" | |
| which mcpp | |
| cat $HOME/.xlings/.xlings.json | |
| - name: "Default: mcpp new → run" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new hello_gcc | |
| cd hello_gcc | |
| mcpp run | |
| # Template packages exercise the sha256-pinned mcpp-index fetch | |
| # path (user report: `mcpp new ... --template imgui` failed with | |
| # fetch 'imgui@0.0.6' exit 1 on hosts without a sha256sum binary). | |
| - name: "Template: mcpp new --template imgui (fetch path)" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new abc1 --template imgui | |
| test -f abc1/mcpp.toml | |
| - name: "Default: build mcpp" | |
| run: | | |
| mcpp clean | |
| mcpp run | |
| - name: "musl-gcc: mcpp new → run" | |
| run: | | |
| mcpp toolchain install gcc 15.1.0-musl | |
| mcpp toolchain default gcc@15.1.0-musl | |
| cd "$(mktemp -d)" | |
| mcpp new hello_musl | |
| cd hello_musl | |
| mcpp run | |
| - name: "musl-gcc: build mcpp" | |
| run: | | |
| mcpp toolchain default gcc@15.1.0-musl | |
| mcpp clean | |
| mcpp run | |
| - name: "gcc 16: mcpp new → run" | |
| run: | | |
| mcpp toolchain install gcc 16.1.0 | |
| mcpp toolchain default gcc@16.1.0 | |
| cd "$(mktemp -d)" | |
| mcpp new hello_gcc16 | |
| cd hello_gcc16 | |
| mcpp run | |
| - name: "gcc 16: build mcpp" | |
| run: | | |
| mcpp toolchain default gcc@16.1.0 | |
| mcpp clean | |
| mcpp run | |
| - name: "LLVM: mcpp new → run" | |
| run: | | |
| mcpp toolchain install llvm 20.1.7 | |
| mcpp toolchain default llvm@20.1.7 | |
| cd "$(mktemp -d)" | |
| mcpp new hello_llvm | |
| cd hello_llvm | |
| mcpp run | |
| - name: "LLVM: build mcpp" | |
| run: | | |
| mcpp toolchain default llvm@20.1.7 | |
| mcpp clean | |
| mcpp run | |
| # ────────────────────────────────────────────────────────────────── | |
| # macOS: llvm@20.1.7 | |
| # ────────────────────────────────────────────────────────────────── | |
| macos-fresh: | |
| name: macOS fresh install | |
| # macos-14: the support floor (mcpp ≥0.0.50 / xlings ≥0.4.50 ship | |
| # minos=14.0 static-libc++ binaries). A fresh install passing here | |
| # is the continuous proof of the macOS 14 floor — and of host-tool | |
| # independence (this image has no sha256sum; macos-15 does). | |
| runs-on: macos-14 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| # v0.4.50+: first xlings release whose macosx binary runs on | |
| # macOS 14 (older ones carry minos=15 and refuse to start). | |
| # v0.4.51: in-process sha256 — required on this image, which | |
| # has no sha256sum binary (pinned fetches failed before). | |
| curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v0.4.51 | |
| echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" | |
| - name: Install mcpp and config mirror | |
| run: | | |
| # Refresh the bundled pkgindex snapshot so the workspace pin | |
| # in .xlings.json (latest mcpp) resolves. | |
| xlings update | |
| xlings install mcpp -y -g # install to global | |
| mcpp --version | |
| mcpp self config --mirror GLOBAL | |
| echo "mcpp debug info:" | |
| which mcpp | |
| cat $HOME/.xlings/.xlings.json | |
| - name: "LLVM: mcpp new → run" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new hello_mac | |
| cd hello_mac | |
| mcpp run | |
| # Template packages exercise the sha256-pinned mcpp-index fetch | |
| # path — this is what broke on hosts without a sha256sum binary | |
| # (stock macOS / bare Windows) before xlings 0.4.51 hashed | |
| # in-process. | |
| - name: "Template: mcpp new --template imgui (fetch path)" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new abc1 --template imgui | |
| test -f abc1/mcpp.toml | |
| - name: "LLVM: build mcpp" | |
| run: | | |
| mcpp clean | |
| mcpp run | |
| # ────────────────────────────────────────────────────────────────── | |
| # Windows: llvm@20.1.7 + MSVC STL | |
| # ────────────────────────────────────────────────────────────────── | |
| windows-fresh: | |
| name: Windows fresh install | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings | |
| shell: pwsh | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex | |
| $xlingsbin = "$env:USERPROFILE\.xlings\subos\current\bin" | |
| $env:PATH = "$xlingsbin;$env:PATH" | |
| $xlingsbin | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
| - name: Install mcpp and config mirror | |
| shell: pwsh | |
| run: | | |
| # Refresh the bundled pkgindex snapshot so the workspace pin | |
| # in .xlings.json (latest mcpp) resolves. | |
| xlings update | |
| xlings install mcpp -y -g --verbose | |
| cat "$env:USERPROFILE\.xlings\.xlings.json" | |
| mcpp --version | |
| mcpp self config --mirror GLOBAL | |
| - name: "LLVM: mcpp new → run" | |
| shell: pwsh | |
| run: | | |
| $tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ } | |
| Set-Location $tmp | |
| mcpp new hello_win | |
| Set-Location hello_win | |
| mcpp run | |
| # Template packages exercise the sha256-pinned mcpp-index fetch | |
| # path (user report: `mcpp new abc1 --template imgui` failed with | |
| # fetch 'imgui@0.0.6' exit 1 on bare Windows — no sha256sum binary | |
| # outside git-bash; fixed by xlings 0.4.51 in-process hashing). | |
| - name: "Template: mcpp new --template imgui (fetch path)" | |
| shell: pwsh | |
| run: | | |
| $tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ } | |
| Set-Location $tmp | |
| mcpp new abc1 --template imgui | |
| if (!(Test-Path abc1/mcpp.toml)) { exit 1 } | |
| - name: "LLVM: build mcpp" | |
| shell: pwsh | |
| run: | | |
| mcpp clean | |
| mcpp run |