Skip to content

One-line install for Linux and Apple Silicon Macs - #339

Closed
powerofsoul wants to merge 1 commit into
ccozianu:mainfrom
powerofsoul:ws-linux-arm64/one-line-install
Closed

powerofsoul wants to merge 1 commit into
ccozianu:mainfrom
powerofsoul:ws-linux-arm64/one-line-install

Conversation

@powerofsoul

Copy link
Copy Markdown
Contributor

Replaces the nine-line download-and-verify block on the install page with one command that also works on Apple Silicon Macs:

curl -fsSL {{download_url}}/install.sh | sh

What changes

  • Release workflow (release-pex.yml): a new build-other-platforms matrix builds devcapsule-linux-arm64 (ubuntu-24.04-arm) and devcapsule-macos-arm64 (macos-15) from the tag, each run on its own platform and checked against the tag (--help, version --json). The publishing job adds them to the release with a SHA256SUMS covering all three executables and an install.sh with the release's URL written in. Recovery and post-publish verification cover the new assets. devcapsule.pex and devcapsule.pex.sha256 are unchanged, so the promotion gate and the manual steps still work.
  • scripts/install.sh (POSIX sh, so it runs under macOS /bin/sh and dash): picks the executable from uname (Linux x86-64, Linux aarch64, Apple Silicon, including a shell under Rosetta). It checks every file against SHA256SUMS with sha256sum or shasum before installing anything, then installs ~/.local/bin/devcapsule. On a Mac it also installs both Linux runtimes as ~/.local/lib/devcapsule/devcapsule-linux-{amd64,arm64}. Everything runs inside main, so a download that cuts off runs nothing.
  • Launcher (runtime_artifact.py): a packaged launcher with DEVCAPSULE_RUNTIME_PEX unset now delivers ~/.local/lib/devcapsule/devcapsule-<platform> when it exists, so a Mac needs no profile edit. The variable still takes precedence. A source-form launcher still needs the variable.
  • release-manifest.py: --artifact records each other platform's executable after checking that it is the tag's build.
  • Docs: the install page leads with the one command and keeps the manual Linux x86-64 steps. The macOS page installs from the release and keeps "Build from source" for unreleased commits, without the export. The Linux page notes the experimental aarch64 executable.

Verified

  • On an Apple Silicon Mac, the script piped into sh installed this Mac's local builds from a file:// release. The launcher and both runtimes landed where expected, and devcapsule version answered.
  • tests/integration/test_install_script.py (7 tests) runs the script as each platform behind a stubbed uname and sysctl. It covers a tampered download (nothing installed), unsupported platforms, and the unfilled template.
  • tests/unit/devcapsule/test_runtime_artifact.py (4 tests) covers the default directory: it is used, the variable wins over it, the error message names it, and a source launcher ignores it.
  • mypy on the changed files passes. The legacy test_runtime_artifact.py and test_release_manifest.py still pass.
  • Full suite on this Mac: 2,798 passed, 25 skipped, 1 failed. The failure is tests/unit/tests/test_conftest.py::test_every_registered_marker_is_a_docker_marker_unless_it_is_a_known_non_docker_one, which fails on main too: linux arm64/capsules #338 registered own_host_patches, and the test's list of non-Docker markers doesn't name it.

Not verified

  • The release workflow itself only runs on a tag. The first release after this merges is the first run of the ubuntu-24.04-arm and macos-15 builds.
  • Re-verifying an older release with this workflow will fail, because it looks for executables that release does not have.

Known red CI, not from this change

main fails Check test conventions since #338. tests/test_linux_arm64_matrix.py and tests/test_project_platform_selection.py sit outside the unit mirror without a heavier suite's marker, and 18 of their tests have no docstring (20 breaches). This PR inherits that failure. The release workflow's nox -s tests step will fail the same way until it is fixed. It's the linux-arm64 workstream's to fix, in a separate PR.

🤖 Generated with Claude Code

A release now builds devcapsule-linux-arm64 and devcapsule-macos-arm64 on
native runners beside devcapsule.pex, records them in the release manifest,
and publishes SHA256SUMS and an install.sh with the release's own URL
written in. The script picks the executable for the computer, checks every
file against SHA256SUMS before installing anything, and on a Mac puts both
Linux runtimes in ~/.local/lib/devcapsule. A packaged launcher now looks
there when DEVCAPSULE_RUNTIME_PEX is unset, so a Mac needs no profile edit.

The install page leads with the one command and keeps the manual Linux
x86-64 steps; the macOS page installs from the release and keeps the
source build for unreleased commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@powerofsoul powerofsoul closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant