fix: remove subos sysroot override, use payload paths for toolchain sysroot #8
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 — simulates first-time user experience on all platforms. | |
| # Flow: xlings install mcpp → build this PR → mcpp new hello → mcpp run | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-fresh-install-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| linux-fresh: | |
| name: Linux fresh install | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Bootstrap xlings + mcpp | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-linux-x86_64.tar.gz | tar -xzf - -C /tmp | |
| /tmp/xlings-0.4.30-linux-x86_64/subos/default/bin/xlings self install | |
| export PATH="$HOME/.xlings/subos/default/bin:$PATH" | |
| xlings install mcpp -y | |
| echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH" | |
| - name: Build this PR's mcpp | |
| run: | | |
| mcpp build | |
| # Put freshly-built mcpp first on PATH so subsequent steps use it | |
| MCPP_DIR=$(dirname "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)") | |
| echo "$MCPP_DIR" >> "$GITHUB_PATH" | |
| - name: "mcpp new hello → mcpp run (GCC)" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new hello | |
| cd hello | |
| mcpp run | |
| - name: "install LLVM → mcpp new → mcpp run" | |
| run: | | |
| mcpp self config --mirror GLOBAL | |
| 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 | |
| macos-fresh: | |
| name: macOS fresh install | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Bootstrap xlings + mcpp | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-macosx-arm64.tar.gz | tar -xzf - -C /tmp | |
| /tmp/xlings-0.4.30-macosx-arm64/subos/default/bin/xlings self install | |
| export PATH="$HOME/.xlings/subos/default/bin:$PATH" | |
| xlings install mcpp -y | |
| echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH" | |
| - name: Build this PR's mcpp | |
| run: | | |
| mcpp build | |
| MCPP_DIR=$(dirname "$(find target -type f -name mcpp ! -name '*.o' | head -1)") | |
| echo "$(cd "$MCPP_DIR" && pwd)" >> "$GITHUB_PATH" | |
| - name: "mcpp new hello → mcpp run" | |
| run: | | |
| cd "$(mktemp -d)" | |
| mcpp new hello | |
| cd hello | |
| mcpp run | |
| windows-fresh: | |
| name: Windows fresh install | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Bootstrap xlings + mcpp | |
| shell: pwsh | |
| env: | |
| XLINGS_NON_INTERACTIVE: '1' | |
| run: | | |
| Invoke-WebRequest -Uri "https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-windows-x86_64.zip" -OutFile "$env:TEMP\xlings.zip" | |
| Expand-Archive -Path "$env:TEMP\xlings.zip" -DestinationPath "$env:TEMP\xlings-extract" -Force | |
| & "$env:TEMP\xlings-extract\xlings-0.4.30-windows-x86_64\subos\default\bin\xlings.exe" self install | |
| $xlingsbin = "$env:USERPROFILE\.xlings\subos\default\bin" | |
| $env:PATH = "$xlingsbin;$env:PATH" | |
| xlings install mcpp -y | |
| $xlingsbin | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
| - name: Build this PR's mcpp | |
| shell: pwsh | |
| run: | | |
| mcpp build | |
| $mcppExe = Get-ChildItem -Path target -Recurse -Filter "mcpp.exe" | Select-Object -First 1 | |
| $mcppExe.DirectoryName | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
| - name: "mcpp new hello → mcpp run" | |
| shell: pwsh | |
| run: | | |
| $tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ } | |
| Set-Location $tmp | |
| mcpp new hello | |
| Set-Location hello | |
| mcpp run |