ci-fresh-install #63
Workflow file for this run
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 | |
| - 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. | |
| 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). | |
| curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v0.4.50 | |
| 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 | |
| # TEMPORARY forensics — mcpplibs.cmdline fetch dies at 0 B on | |
| # macos-14 (R5/R6) while linux passes the same step. Hypothesis: | |
| # the xlings 0.4.50 adaptive mirror (sha256-pinned URLs may try a | |
| # third-party mirror BEFORE the author URL) picks a dead mirror | |
| # host on this runner. Probe A = raw connectivity control, | |
| # B = exact failing flow (control), C = adaptive mirror off. | |
| - name: "Debug: cmdline fetch forensics (temporary)" | |
| run: | | |
| echo "=== probe A: direct curl of the author URL ===" | |
| curl -fsSL -o /tmp/c.tgz https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz \ | |
| && shasum -a 256 /tmp/c.tgz || echo "A: curl FAILED" | |
| echo "=== probe B: control — exact failing flow ===" | |
| mcpp clean | |
| mcpp run && echo "B: PASSED (flake?)" || echo "B: failed (expected)" | |
| echo "=== probe C: XLINGS_ADAPTIVE_MIRROR=off ===" | |
| mcpp clean | |
| XLINGS_ADAPTIVE_MIRROR=off mcpp run \ | |
| && echo "C: PASSED — adaptive mirror is the culprit" \ | |
| || echo "C: failed — culprit elsewhere" | |
| - 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 | |
| - name: "LLVM: build mcpp" | |
| shell: pwsh | |
| run: | | |
| mcpp clean | |
| mcpp run |