|
| 1 | +name: ci-aarch64-fresh-install |
| 2 | + |
| 3 | +# End-to-end "fresh install" of the whole ecosystem on a NATIVE aarch64 host, |
| 4 | +# exactly as a new aarch64-Linux / Termux(-proot) user would: |
| 5 | +# |
| 6 | +# curl quick_install.sh | bash -> installs aarch64 xlings (static musl) |
| 7 | +# xlings install mcpp -> installs aarch64 mcpp (static musl) |
| 8 | +# mcpp new / build / run -> NATIVE aarch64 build (pulls the native |
| 9 | +# musl-gcc toolchain from the ecosystem) |
| 10 | +# |
| 11 | +# Validates that every published aarch64 asset (xlings, mcpp, musl-gcc) lines |
| 12 | +# up and that mcpp can build & run a real `import std` program natively on |
| 13 | +# aarch64 — no cross, no qemu. Runs on GitHub's native ARM64 runner. |
| 14 | + |
| 15 | +on: |
| 16 | + workflow_dispatch: |
| 17 | + schedule: |
| 18 | + - cron: '0 6 * * 1' # weekly Mon 06:00 UTC |
| 19 | + push: |
| 20 | + branches: [ main ] |
| 21 | + paths: |
| 22 | + - '.github/workflows/ci-aarch64-fresh-install.yml' |
| 23 | + |
| 24 | +concurrency: |
| 25 | + group: ci-${{ github.workflow }}-${{ github.ref }} |
| 26 | + cancel-in-progress: true |
| 27 | + |
| 28 | +jobs: |
| 29 | + fresh-install: |
| 30 | + name: fresh install + native build (aarch64 / glibc) |
| 31 | + runs-on: ubuntu-24.04-arm |
| 32 | + timeout-minutes: 60 |
| 33 | + steps: |
| 34 | + - name: System info |
| 35 | + run: | |
| 36 | + uname -a |
| 37 | + echo "arch: $(uname -m)" # aarch64 on this runner |
| 38 | +
|
| 39 | + - name: Fresh-install xlings (curl | bash) |
| 40 | + env: |
| 41 | + XLINGS_NON_INTERACTIVE: '1' |
| 42 | + run: | |
| 43 | + curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash |
| 44 | + echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" |
| 45 | + echo "$HOME/.xlings/bin" >> "$GITHUB_PATH" |
| 46 | +
|
| 47 | + - name: Verify xlings + GLOBAL mirror |
| 48 | + run: | |
| 49 | + xlings --version |
| 50 | + xlings config --mirror GLOBAL 2>/dev/null || true |
| 51 | + xlings update -y 2>/dev/null || xlings update 2>/dev/null || true |
| 52 | +
|
| 53 | + - name: Fresh-install mcpp via xlings |
| 54 | + run: | |
| 55 | + xlings install mcpp -y |
| 56 | + mcpp --version |
| 57 | + mcpp self config --mirror GLOBAL 2>/dev/null || true |
| 58 | +
|
| 59 | + - name: Native build + run an `import std` program |
| 60 | + run: | |
| 61 | + work=$(mktemp -d); cd "$work" |
| 62 | + mcpp new hello |
| 63 | + cd hello |
| 64 | + # default src uses import std (C++23) |
| 65 | + mcpp build |
| 66 | + out=$(mcpp run 2>/dev/null || true) |
| 67 | + echo "program output: $out" |
| 68 | + bin=$(find target -type f -name hello | head -1) |
| 69 | + file "$bin" |
| 70 | + file "$bin" | grep -q "ARM aarch64" || { echo "expected aarch64 ELF"; exit 1; } |
| 71 | +
|
| 72 | + - name: Self-host — build mcpp from source natively |
| 73 | + run: | |
| 74 | + git clone --depth 1 https://github.com/mcpp-community/mcpp /tmp/mcpp-src |
| 75 | + cd /tmp/mcpp-src |
| 76 | + mcpp self config --mirror GLOBAL 2>/dev/null || true |
| 77 | + mcpp build |
| 78 | + m=$(find target -type f -name mcpp | head -1) |
| 79 | + file "$m" | grep -q "ARM aarch64" || { echo "expected aarch64 mcpp"; exit 1; } |
| 80 | + "$m" --version |
0 commit comments