Add linux_arm64 builds for Ebitengine and Bevy
Batocera and the ES-family distributions run on ARM as much as on x86_64 — Raspberry Pi, Odroid, the retro handhelds — and a linux_x64 binary installs there but will not start. There was no Linux ARM asset kind at all: KINDS had linux_x86 and linux_x64 and mac_arm64, but nothing for 64-bit ARM Linux. Registering the kind is deliberately separate from producing it: a platform service only includes BuildLinuxArm64 once its pipeline builds the artifact, otherwise /api/builds would report it missing for every release. Hence Ebitengine and Bevy only. Godot needs a Linux arm64 export preset in each game repo first; LÖVE fuses an upstream AppImage that ships x86_64 only; TIC-80's export command has no ARM target. Ebitengine needs cgo on Linux, so binary_build gained a cross-compiler argument — and unsets CC for native targets, otherwise a build after the ARM one silently picks up the cross gcc. Verified by cross-compiling both demos in the rebuilt images: each produced a genuine AArch64 ELF (e_machine 183), not a silent fallback. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: ../libs/ruby/warp_engine
|
||||
specs:
|
||||
warp_engine (0.2.0)
|
||||
warp_engine (0.3.0)
|
||||
apipie-rails
|
||||
blueprinter
|
||||
rails (>= 8.0)
|
||||
|
||||
@@ -160,6 +160,7 @@ export default {
|
||||
win_x64: 'Windows (64-bit)',
|
||||
linux_x86: 'Linux (32-bit)',
|
||||
linux_x64: 'Linux (64-bit)',
|
||||
linux_arm64: 'Linux (ARM 64-bit)',
|
||||
mac_x64: 'macOS (Intel)',
|
||||
mac_arm64: 'macOS (Apple Silicon)',
|
||||
mac_universal: 'macOS',
|
||||
|
||||
@@ -160,6 +160,7 @@ export default {
|
||||
win_x64: 'Windows (64 bit)',
|
||||
linux_x86: 'Linux (32 bit)',
|
||||
linux_x64: 'Linux (64 bit)',
|
||||
linux_arm64: 'Linux (ARM 64 bit)',
|
||||
mac_x64: 'macOS (Intel)',
|
||||
mac_arm64: 'macOS (Apple Silicon)',
|
||||
mac_universal: 'macOS',
|
||||
|
||||
@@ -120,6 +120,7 @@ const columnGroups = [
|
||||
color: 'group-amber',
|
||||
kinds: [
|
||||
{ kind: 'linux_x64', sub: '64 bit' },
|
||||
{ kind: 'linux_arm64', sub: 'ARM 64 bit' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -314,7 +314,7 @@ const downloadUrl = (path: string) =>
|
||||
// az asset-táblázat sorai és sorrendjük; a html nem letöltés, azt a Play gomb viszi
|
||||
const TABLE_KIND_ORDER = [
|
||||
'cartridge', 'source', 'docs',
|
||||
'win_x64', 'win_x86', 'linux_x64', 'linux_x86',
|
||||
'win_x64', 'win_x86', 'linux_x64', 'linux_arm64', 'linux_x86',
|
||||
'mac_universal', 'mac_arm64', 'mac_x64',
|
||||
]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module WarpEngine
|
||||
class ReleaseAsset < ApplicationRecord
|
||||
KINDS = %w[cartridge source html docs
|
||||
win_x86 win_x64 linux_x86 linux_x64
|
||||
win_x86 win_x64 linux_x86 linux_x64 linux_arm64
|
||||
mac_x64 mac_arm64 mac_universal].freeze
|
||||
|
||||
belongs_to :release
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
module WarpEngine
|
||||
module Platforms
|
||||
module Builds
|
||||
# Linux on 64-bit ARM: Raspberry Pi 4/5, Odroid, and the retro handhelds.
|
||||
# Batocera and the ES-family distributions run on these as much as on
|
||||
# x86_64, and an x64 binary installs there but will not start — which is
|
||||
# why this is a separate kind rather than something linux_x64 can cover.
|
||||
#
|
||||
# Include this in a platform service only once its pipeline actually
|
||||
# produces the artifact: registering the kind makes /api/builds report it
|
||||
# as missing for every release until then.
|
||||
module BuildLinuxArm64
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
register_expected_kind "linux_arm64"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def linux_arm64_asset_path(versioned)
|
||||
path = full_path("#{versioned}-linux-arm64.zip")
|
||||
{ "linux_arm64" => path } if File.file?(path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -65,6 +65,15 @@ steps:
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
|
||||
cargo build --release --target x86_64-pc-windows-gnu
|
||||
pack_binary "win-x64" "target/x86_64-pc-windows-gnu/release/<%= name %>.exe" "<%= name %>.exe"
|
||||
# linux-arm64: Raspberry Pi, Odroid, retro handhelds. pkg-config has to
|
||||
# be told it may cross, and pointed at the arm64 .pc files, otherwise
|
||||
# alsa-sys/libudev-sys pick up the host x86_64 libraries.
|
||||
echo "==> Building linux-arm64 binary"
|
||||
PKG_CONFIG_ALLOW_CROSS=1 \
|
||||
PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig \
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
|
||||
cargo build --release --target aarch64-unknown-linux-gnu
|
||||
pack_binary "linux-arm64" "target/aarch64-unknown-linux-gnu/release/<%= name %>" "<%= name %>"
|
||||
|
||||
- name: upload
|
||||
image: alpine
|
||||
@@ -81,7 +90,7 @@ steps:
|
||||
META_DST="<%= name %>-$VERSION.metadata.json"
|
||||
cp $META_SRC $META_DST
|
||||
BINS=""
|
||||
for slug in win-x64 linux-x64; do
|
||||
for slug in win-x64 linux-x64 linux-arm64; do
|
||||
[ -f "<%= name %>-$VERSION-$slug.zip" ] && BINS="$BINS <%= name %>-$VERSION-$slug.zip"
|
||||
done
|
||||
for f in $FILE $META_DST $BINS; do
|
||||
|
||||
@@ -6,6 +6,7 @@ module WarpEngine
|
||||
include Builds::BuildWeb
|
||||
include Builds::BuildWinX64
|
||||
include Builds::BuildLinuxX64
|
||||
include Builds::BuildLinuxArm64
|
||||
|
||||
label "Bevy"
|
||||
end
|
||||
|
||||
+8
-2
@@ -44,11 +44,14 @@ steps:
|
||||
# helper: builds one target + zips it with a single root folder
|
||||
# (unix zip keeps the executable bit)
|
||||
binary_build() {
|
||||
B_GOOS="$1"; B_GOARCH="$2"; B_CGO="$3"; B_EXT="$4"; B_TARGET="$5"
|
||||
B_GOOS="$1"; B_GOARCH="$2"; B_CGO="$3"; B_EXT="$4"; B_TARGET="$5"; B_CC="$6"
|
||||
PKG_DIR="<%= name %>-$VERSION-$B_TARGET"
|
||||
echo "==> Building $PKG_DIR"
|
||||
rm -rf "$PKG_DIR" "$PKG_DIR.zip"
|
||||
mkdir -p "$PKG_DIR"
|
||||
# cgo cross-compile needs an explicit cross gcc; a native build must
|
||||
# not see CC at all, otherwise go picks the wrong compiler
|
||||
if [ -n "$B_CC" ]; then export CC="$B_CC"; else unset CC; fi
|
||||
CGO_ENABLED=$B_CGO GOOS=$B_GOOS GOARCH=$B_GOARCH go build -o "$PKG_DIR/<%= name %>$B_EXT" .
|
||||
if [ -f LICENSE ]; then cp LICENSE "$PKG_DIR/"; fi
|
||||
if [ -f README.md ]; then cp README.md "$PKG_DIR/"; fi
|
||||
@@ -56,10 +59,13 @@ steps:
|
||||
rm -rf "$PKG_DIR"
|
||||
echo "==> $PKG_DIR.zip kesz"
|
||||
}
|
||||
# CI (linux builder) builds these three:
|
||||
# CI (linux builder) builds these four:
|
||||
binary_build "windows" "386" "0" ".exe" "win-x86"
|
||||
binary_build "windows" "amd64" "0" ".exe" "win-x64"
|
||||
binary_build "linux" "amd64" "1" "" "linux-x64"
|
||||
# linux-arm64: Raspberry Pi, Odroid, retro handhelds — cgo cross-build
|
||||
# against the arm64 X11/GL/ALSA headers in the builder image
|
||||
binary_build "linux" "arm64" "1" "" "linux-arm64" "aarch64-linux-gnu-gcc"
|
||||
|
||||
- name: artifact
|
||||
image: alpine
|
||||
|
||||
@@ -7,6 +7,7 @@ module WarpEngine
|
||||
include Builds::BuildWinX86
|
||||
include Builds::BuildWinX64
|
||||
include Builds::BuildLinuxX64
|
||||
include Builds::BuildLinuxArm64
|
||||
include Builds::BuildMacX64
|
||||
include Builds::BuildMacArm64
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module WarpEngine
|
||||
VERSION = "0.2.0"
|
||||
VERSION = "0.3.0"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user