ci: debug install path on failure #61
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build: | |
| name: build (linux x86_64, mcpp) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install xlings | |
| env: | |
| XLINGS_VERSION: 0.4.30 | |
| run: | | |
| tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz" | |
| curl -fsSL -o "/tmp/${tarball}" \ | |
| "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}" | |
| tar -xzf "/tmp/${tarball}" -C /tmp | |
| "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install | |
| echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" | |
| - name: Install workspace tools (.xlings.json → mcpp 0.0.11) | |
| run: xlings install -y | |
| # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + | |
| # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by | |
| # mcpp 0.0.11, so a fixed key suffices. | |
| - name: Cache mcpp sandbox | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry | |
| key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v2 | |
| - name: Update package index | |
| run: mcpp index update | |
| - name: Build with mcpp | |
| run: | | |
| mcpp build 2>&1 || { | |
| echo "=== MCPP ENV ===" | |
| mcpp self env 2>&1 || true | |
| echo "=== XPKGS DIR ===" | |
| MCPP_HOME_DIR=$(mcpp self env 2>&1 | grep 'MCPP_HOME' | head -1 | sed 's/.*= *//') | |
| find "$MCPP_HOME_DIR" -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in MCPP_HOME" | |
| find ~/.xlings -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in ~/.xlings" | |
| exit 1 | |
| } |