add/fix: ci fresh install #29
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 PRs to main, manual trigger, and daily schedule. | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| 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: | | |
| 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: "GCC: mcpp new → run" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new hello_gcc | |
| cd hello_gcc | |
| mcpp run | |
| - name: "GCC: 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: "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 | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings | |
| 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: | | |
| 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)" | |
| xlings use mcpp | |
| mcpp new hello_mac | |
| cd hello_mac | |
| mcpp run | |
| - name: "LLVM: build mcpp" | |
| run: | | |
| xlings use mcpp | |
| 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: | | |
| xlings install mcpp -y -g | |
| 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 |