Repository navigation
ci: clean-install matrix (linux + macos + windows + windows-ps5) - #186
Conversation
Joel asked 2026-04-28: "guarantee clean mac and windows installs work,
and as much of this as possible is fixed... CI after fixing what we deem
important for release."
Three concurrent jobs on every PR + every push to canary/main:
- clean-install-linux: ubuntu install.sh + airc doctor + smoke (host
stays up, teardown clean).
- clean-install-macos: macos install.sh + same smoke.
- clean-install-windows: windows install.ps1 (pwsh) + airc doctor.
- clean-install-windows-ps5: install.ps1 under Windows PowerShell 5.1 —
the default that ships with Windows. Catches
regressions like #91 (bootstrap fails under
5.1 because airc.ps1 has #Requires -Version
7.0).
Plus, on push to canary/main only (not PRs — rate limits + flaky network):
- integration-suite: full test/integration.sh on ubuntu. The heavy
gate; serves as the canary→main green signal.
Concurrency group cancels superseded runs on the same ref. PR jobs run
on every push to the PR branch.
Until the open Windows install issues land (#91, #94, #95, #96, #97,
#98, #99, #152), the windows jobs treat `airc doctor` failures as
non-fatal — the install + bin-discovery itself still validates,
and we'll tighten to hard-fail once those are resolved.
Open issues this CI surface:
- #91 — bootstrap PS 5.1 (clean-install-windows-ps5)
- #94 — Tailscale winget package ID typo (install)
- #96 — install.ps1 doesn't install OpenSSH Server
- #98 — install.ps1 leaves DefaultShell unconfigured
- #152 — airc.ps1 ~20 commits behind canary
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
pgrep -f 'airc connect ...' didn't match the actual argv 'bash /path/to/airc connect ...' on the runners. Switch to checking airc.pid which is canonical (and what airc teardown itself reads). For Windows: PS try/catch doesn't trap native exit codes — airc doctor exited 1 because gh wasn't authed and tailscale wasn't installed (both expected in CI), but the catch never fired. Run airc doctor directly, log the LASTEXITCODE if non-zero, then explicitly exit 0 so the step treats it as informational (the install + bin-discovery is what we're gating on right now).
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow intended to validate “clean install” paths across Linux/macOS/Windows (including Windows PowerShell 5.1) and to run the full integration suite on canary/main pushes, providing earlier signal for installer regressions—especially on Windows.
Changes:
- Introduces
clean-install-*jobs for Linux, macOS, Windows (pwsh), and Windows PowerShell 5.1. - Adds a lightweight smoke check for linux/macos (
airc connect --no-room --no-gist+airc teardown). - Adds an
integration-suitejob on canary/main pushes to runtest/integration.sh.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cp -r . $HOME/.airc-src/ | ||
| AIRC_SKIP_PREREQS=1 AIRC_DIR=$HOME/.airc-src bash install.sh | ||
|
|
||
| - name: airc doctor | ||
| run: | |
There was a problem hiding this comment.
On macOS the smoke test backgrounds airc connect --no-room --no-gist, but the liveness check uses pgrep -f "airc connect --no-gist", which won't match if --no-room appears between connect and --no-gist. Match the full argv or check the background PID so the smoke test is stable.
|
|
||
| - name: Smoke — same as linux (airc.pid based) | ||
| run: | | ||
| export PATH="$HOME/.local/bin:$PATH" |
There was a problem hiding this comment.
The macOS post-teardown check again uses pgrep -f "airc connect --no-gist", which may miss the actual argv (--no-room --no-gist) and could produce a false pass/fail. Consider asserting teardown via the specific background PID (or a pattern that matches the full flag set).
| run: | | ||
| export PATH="$HOME/.local/bin:$PATH" | ||
| which airc | ||
| airc doctor || echo "airc doctor reported issues (non-fatal in CI)" | ||
|
|
There was a problem hiding this comment.
airc doctor is treated as non-fatal on linux/macos (airc doctor || echo ...). The PR description calls out using doctor as part of the clean-install gate; if linux/macos doctor failures should block regressions, this should fail the job (keeping the non-fatal behavior only on the Windows jobs while the port catches up).
| if [ ! -f /tmp/ci-airc/state/airc.pid ]; then | ||
| echo "FAIL: airc.pid never appeared — connect didn't reach host loop" | ||
| cat /tmp/ci-airc/host.log || true | ||
| exit 1 | ||
| fi | ||
| for p in $(cat /tmp/ci-airc/state/airc.pid); do | ||
| if ! kill -0 "$p" 2>/dev/null; then | ||
| echo "FAIL: PID $p in airc.pid is not alive" | ||
| cat /tmp/ci-airc/host.log || true | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
This step sets $env:AIRC_SKIP_PREREQS = '1', but install.ps1 does not currently honor an AIRC_SKIP_PREREQS escape hatch (it always runs the winget/capability prereq installs). Either remove the env var to avoid implying it's effective, or add a corresponding check in install.ps1 and then rely on it here.
| & "$env:AIRC_DIR\install.ps1" | ||
|
|
||
| - name: airc doctor (powershell wrapper) | ||
| shell: pwsh | ||
| run: | |
There was a problem hiding this comment.
This job also sets $env:AIRC_SKIP_PREREQS = '1', but install.ps1 doesn't currently branch on that environment variable. If the intent is to skip winget/capability installs on CI runners, install.ps1 needs an explicit check; otherwise drop the variable here to avoid confusion.
| # Three jobs on every PR + every push to canary/main: | ||
| # | ||
| # clean-install-linux ubuntu install.sh + airc doctor + smoke test | ||
| # clean-install-macos macos install.sh + airc doctor + smoke test | ||
| # clean-install-windows windows install.ps1 + airc doctor (PS-side) |
There was a problem hiding this comment.
The header comment says there are "Three jobs on every PR" and lists linux/macos/windows, but this workflow also adds clean-install-windows-ps5. Update the comment block so it accurately reflects the jobs that run on PRs (and what each covers).
| # Three jobs on every PR + every push to canary/main: | |
| # | |
| # clean-install-linux ubuntu install.sh + airc doctor + smoke test | |
| # clean-install-macos macos install.sh + airc doctor + smoke test | |
| # clean-install-windows windows install.ps1 + airc doctor (PS-side) | |
| # Four jobs on every PR + every push to canary/main: | |
| # | |
| # clean-install-linux ubuntu install.sh + airc doctor + smoke test | |
| # clean-install-macos macos install.sh + airc doctor + smoke test | |
| # clean-install-windows windows install.ps1 + airc doctor (PowerShell) | |
| # clean-install-windows-ps5 windows PowerShell 5 compatibility coverage |
| run: | | ||
| mkdir -p $HOME/.airc-src | ||
| cp -r . $HOME/.airc-src/ |
There was a problem hiding this comment.
The current staging approach copies the checked-out repo (including .git) into $HOME/.airc-src and then runs install.sh. On pull_request checkouts, git rev-parse --abbrev-ref HEAD is typically HEAD, so install.sh treats this as a non-channel branch and checks out/pulls main/canary, meaning CI won't actually validate the PR's install script and runtime. Consider adding an explicit CI mode to install.sh to skip the channel switch/pull, or adjust the workflow to exercise only the installer's wiring steps without invoking the git update logic.
| run: | | |
| mkdir -p $HOME/.airc-src | |
| cp -r . $HOME/.airc-src/ | |
| # Copy the working tree without .git so PR checkouts in detached | |
| # HEAD do not trigger install.sh branch/channel switch logic. | |
| run: | | |
| mkdir -p $HOME/.airc-src | |
| tar --exclude=.git -cf - . | tar -C $HOME/.airc-src -xf - |
| # process line is `bash /path/to/airc connect ...` and pgrep | ||
| # patterns are brittle across distros. | ||
| for i in 1 2 3 4 5 6 7 8 9 10; do | ||
| [ -f /tmp/ci-airc/state/airc.pid ] && break | ||
| sleep 1 |
There was a problem hiding this comment.
On linux the smoke test backgrounds airc connect --no-room --no-gist, but the liveness check uses pgrep -f "airc connect --no-gist". That pattern will not match when --no-room appears between connect and --no-gist, so the check can fail even when the process is running. Use a pattern that matches the actual argv (or check the captured $HOST_PID directly).
| cat /tmp/ci-airc/host.log || true | ||
| exit 1 | ||
| fi | ||
| # Verify all PIDs in airc.pid are alive. |
There was a problem hiding this comment.
The post-teardown check also uses pgrep -f "airc connect --no-gist", which may not match the actual process argv (--no-room --no-gist) and could let a still-running host slip through. Prefer checking $HOST_PID (or match the full flag set) for a reliable teardown assertion.
Summary
Joel asked 2026-04-28: "guarantee clean mac and windows installs work, and as much of this as possible is fixed… CI after fixing what we deem important for release."
This is the diagnostic — five jobs that run on every PR + every canary/main push:
test/integration.shWhy now
Multiple Windows install issues from RebelTechPro (#91, #94, #95, #96, #97, #98, #99) plus the airc.ps1 drift (#152) have been sitting open. Without CI, every regression slipped past review and only surfaced when a real Windows user hit them. This PR doesn't fix them — it gives us the feedback loop to fix them with confidence.
Until Windows is green
airc doctorissues are treated as non-fatal in the windows jobs. We'll tighten to hard-fail once the open Windows install issues land. The install + bin-discovery itself still validates the basic path.Test plan
🤖 Generated with Claude Code