Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
runner: macos-latest
- target: linux_x86_64
runner: ubuntu-latest
- target: linux_aarch64
runner: ubuntu-24.04-arm
- target: windows_x86_64
runner: windows-latest
defaults:
Expand Down Expand Up @@ -111,8 +113,8 @@ jobs:
# independently, so a target failing partway through wouldn't
# necessarily fail the whole `mix release` invocation. Not everyone
# installing this uses Homebrew (no tap exists yet anyway - see
# #14/CRY-37), so linux_x86_64/macos_aarch64 are the primary
# install path for a lot of users; silently shipping a release
# #14/CRY-37), so linux_x86_64/linux_aarch64/macos_aarch64 are the
# primary install path for a lot of users; silently shipping a release
# missing one of them is worse than failing loudly here.
# windows_x86_64 stays best-effort, as it always has.
name: Verify this target actually built
Expand All @@ -130,6 +132,20 @@ jobs:
exit 1
fi
fi
-
# Smoke-test the linux_aarch64 binary on the native ARM64 runner:
# proves the binary executes (right architecture), the OTP app boots,
# and all NIFs (exqlite via elixir_make/Zig, mdex_native via
# rustler_precompiled) load correctly. `lc version` runs in
# interactive mode (no LINEAR_CLI_DAEMON=true), starts an empty
# supervisor, prints the version, and exits 0 - no API key or network
# needed. Only runs for linux_aarch64 because that's the only target
# whose runner architecture matches the binary (macos/Windows smoke
# tests are out of scope for CRY-48).
if: matrix.target == 'linux_aarch64'
name: Smoke-test the linux_aarch64 binary boots and NIFs load
timeout-minutes: 1
run: ./burrito_out/lc_linux_aarch64 version
-
# Handed off to burrito-package below, which needs every target's
# binary gathered back into one place before it can build the
Expand Down
2 changes: 2 additions & 0 deletions app/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule LinearCli.MixProject do
# Burrito's own docs/source, and exqlite's NIF cross-compilation verified
# empirically (built+ran the linux_x86_64 target under podman/QEMU) - see
# documents/phase-8-plan.adoc. macOS Intel intentionally not targeted.
# Kept in sync with .github/workflows/main.yaml's burrito-build matrix.
defp releases do
[
lc: [
Expand All @@ -30,6 +31,7 @@ defmodule LinearCli.MixProject do
targets: [
macos_aarch64: [os: :darwin, cpu: :aarch64],
linux_x86_64: [os: :linux, cpu: :x86_64],
linux_aarch64: [os: :linux, cpu: :aarch64],
windows_x86_64: [os: :windows, cpu: :x86_64]
]
]
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ detect_target() {
Linux)
case "$(uname -m)" in
x86_64) printf '%s\n' linux_x86_64 ;;
aarch64) printf '%s\n' linux_aarch64 ;;
*)
printf 'error: unsupported Linux architecture: %s (only x86_64 is built)\n' "$(uname -m)" >&2
printf 'error: unsupported Linux architecture: %s (only x86_64 and aarch64 are built)\n' "$(uname -m)" >&2
exit 1
;;
esac
Expand Down