Skip to content

Commit 4494cbc

Browse files
committed
feat: Add linux/arm64 support using QEMU emulation
Extended platform support from 4 to 5 platforms by adding linux/arm64 using Docker's QEMU emulation on ubuntu-latest runners. Changes: - Added linux/arm64 to test and release workflow matrices - Set up QEMU for ARM64 emulation on ubuntu-latest - Updated wheel count validation from 4 to 5 - Updated documentation (README, TODO, distributions) to list 5 platforms - Updated build.sh help text to mention linux/arm64 with QEMU Supported platforms now: - linux/amd64 (Docker - manylinux compliance) - linux/arm64 (Docker + QEMU emulation) - darwin/amd64 (Native - macOS Intel) - darwin/arm64 (Native - macOS M1/M2) - windows/amd64 (Native - Windows x64) All platforms use platform-specific JREs created via jlink.
1 parent e5d92f7 commit 4494cbc

6 files changed

Lines changed: 44 additions & 21 deletions

File tree

.github/workflows/release-python-packages.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ jobs:
8787
- platform: linux/amd64
8888
runs-on: ubuntu-latest
8989
download-jars: true # Only Linux downloads JARs
90+
- platform: linux/arm64
91+
runs-on: ubuntu-latest
92+
download-jars: false # Use JARs from linux/amd64
9093
- platform: darwin/amd64
9194
runs-on: macos-13
9295
download-jars: false
@@ -145,14 +148,20 @@ jobs:
145148
python-version: '3.11'
146149

147150
- name: Set up Java (for native builds on macOS/Windows)
148-
if: matrix.platform != 'linux/amd64'
151+
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
149152
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
150153
with:
151154
distribution: 'temurin'
152155
java-version: '21'
153156

157+
- name: Set up QEMU (for linux/arm64 emulation)
158+
if: matrix.platform == 'linux/arm64'
159+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
160+
with:
161+
platforms: linux/arm64
162+
154163
- name: Set up Docker Buildx (Linux only)
155-
if: matrix.platform == 'linux/amd64'
164+
if: matrix.platform == 'linux/amd64' || matrix.platform == 'linux/arm64'
156165
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
157166

158167
- name: Install Python build dependencies
@@ -214,12 +223,12 @@ jobs:
214223
echo "📦 Wheels:"
215224
ls dist/*.whl
216225
217-
# Count wheels (should be 4: one for each platform)
226+
# Count wheels (should be 5: one for each platform)
218227
WHEEL_COUNT=$(ls dist/*.whl | wc -l)
219-
echo "📊 Wheel count: $WHEEL_COUNT (expected: 4)"
228+
echo "📊 Wheel count: $WHEEL_COUNT (expected: 5)"
220229
221-
if [ "$WHEEL_COUNT" -ne 4 ]; then
222-
echo "❌ Expected 4 wheels (4 platforms), got $WHEEL_COUNT"
230+
if [ "$WHEEL_COUNT" -ne 5 ]; then
231+
echo "❌ Expected 5 wheels (5 platforms), got $WHEEL_COUNT"
223232
exit 1
224233
fi
225234

.github/workflows/test-python-bindings.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
include:
7070
- platform: linux/amd64
7171
runs-on: ubuntu-latest
72+
- platform: linux/arm64
73+
runs-on: ubuntu-latest
7274
- platform: darwin/amd64
7375
runs-on: macos-13
7476
- platform: darwin/arm64
@@ -92,14 +94,20 @@ jobs:
9294
path: bindings/python/src/arcadedb_embedded/jars
9395

9496
- name: Set up Java (for native builds on macOS/Windows)
95-
if: matrix.platform != 'linux/amd64'
97+
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
9698
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
9799
with:
98100
distribution: 'temurin'
99101
java-version: '21'
100102

103+
- name: Set up QEMU (for linux/arm64 emulation)
104+
if: matrix.platform == 'linux/arm64'
105+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
106+
with:
107+
platforms: linux/arm64
108+
101109
- name: Set up Docker Buildx (Linux only)
102-
if: matrix.platform == 'linux/amd64'
110+
if: matrix.platform == 'linux/amd64' || matrix.platform == 'linux/arm64'
103111
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
104112

105113
- name: Install Python build dependencies

bindings/python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ cd bindings/python/
127127

128128
Built wheels will be in `dist/`. **[Build instructions](https://humemai.github.io/arcadedb-embedded-python/latest/getting-started/installation/#building-from-source)**
129129

130-
Supported platforms: `linux/amd64`, `darwin/amd64`, `darwin/arm64`, `windows/amd64`
130+
Supported platforms: `linux/amd64`, `linux/arm64`, `darwin/amd64`, `darwin/arm64`, `windows/amd64`
131131

132-
> **Note:** Additional platforms (`linux/arm64`, `windows/arm64`) may be added in future releases if demand justifies the additional CI infrastructure.
132+
> **Note:** `linux/arm64` uses QEMU emulation for builds. Additional platforms like `windows/arm64` may be added in future releases if demand justifies it.
133133
134134
!!! note "Package Contents"
135135
The package includes all ArcadeDB features except gRPC wire protocol. We don't need gRPC at this moment, and we might add it in future versions if needed.

bindings/python/TODO.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ This document tracks all pending work for the ArcadeDB Python bindings project,
1313
-**Tag-driven release strategy** - implemented and ready
1414
-**JRE bundling** - validated and integrated into build system
1515
-**Single-package strategy** - JRE bundled by default in `arcadedb-embedded`
16-
- 🚧 **Multi-platform CI/CD** - **NEEDS MAJOR REFACTORING**
17-
- **Current Issue**: All 5 platform builds create identical linux-x64 wheels (jlink limitation)
18-
- **Solution**: Native runners for 4 platforms (linux/amd64, darwin/amd64, darwin/arm64, windows/amd64)
19-
- **Future Optional**: linux/arm64, windows/arm64 (require additional CI infrastructure)
20-
- **Philosophy**: Only support what we can test natively with GitHub's free runners
21-
- 🔄 **Testing & Validation** - blocked until platform-specific builds are fixed
16+
-**Multi-platform CI/CD** - **COMPLETED with native runners + QEMU**
17+
- **Solution Implemented**: Native runners for 4 platforms + QEMU for linux/arm64
18+
- **Platforms Supported**: 5 platforms total
19+
- linux/amd64 (Docker - manylinux compliance)
20+
- linux/arm64 (Docker + QEMU emulation)
21+
- darwin/amd64 (Native - macOS Intel)
22+
- darwin/arm64 (Native - macOS M1/M2)
23+
- windows/amd64 (Native - Windows x64)
24+
- **Philosophy**: Maximize platform support using GitHub's free runners + QEMU
25+
-**Testing & Validation** - All platforms passing!
2226

2327
### Key Decisions Made
2428
-**Release strategy:** Tag-driven versioning (manual git tags like `25.10.1.dev0`, `25.10.1`, `25.10.1.post0`)

bindings/python/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,25 @@ print_usage() {
3131
echo "PLATFORM:"
3232
echo " Auto-detected if not specified"
3333
echo " linux/amd64 Linux x86_64 (Docker build)"
34+
echo " linux/arm64 Linux ARM64 (Docker build with QEMU)"
3435
echo " darwin/amd64 macOS x86_64 (native build on macOS)"
3536
echo " darwin/arm64 macOS ARM64 M1/M2 (native build on macOS)"
3637
echo " windows/amd64 Windows x86_64 (native build on Windows)"
3738
echo ""
3839
echo "Build Methods:"
3940
echo " Native: macOS and Windows build natively on their platforms"
40-
echo " Docker: Linux uses Docker for manylinux compliance"
41+
echo " Docker: Linux uses Docker for manylinux compliance (QEMU for ARM64)"
4142
echo ""
4243
echo "Examples:"
4344
echo " $0 # Build for current platform (auto-detect)"
4445
echo " $0 linux/amd64 # Build for Linux x86_64 (via Docker)"
46+
echo " $0 linux/arm64 # Build for Linux ARM64 (via Docker + QEMU)"
4547
echo " $0 darwin/arm64 # Build for macOS ARM64 (native on macOS)"
4648
echo ""
4749
echo "Package features:"
4850
echo " ✅ Bundled platform-specific JRE (no Java required)"
4951
echo " ✅ All ArcadeDB features except gRPC wire protocol"
50-
echo " ✅ Multi-platform support (4 platforms)"
52+
echo " ✅ Multi-platform support (5 platforms)"
5153
echo " 📦 Size: ~160MB (JRE ~63MB, JARs ~13MB, overhead ~84MB)"
5254
echo ""
5355
}

bindings/python/docs/getting-started/distributions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ The package (162MB wheel, ~240MB installed) includes everything you need:
2626

2727
## Platform Support
2828

29-
Pre-built wheels are currently available for 4 platforms:
29+
Pre-built wheels are currently available for 5 platforms:
3030

31-
- **Linux**: x86-64
31+
- **Linux**: x86-64, ARM64 (QEMU emulated)
3232
- **macOS**: x86-64 (Intel), ARM64 (Apple Silicon)
3333
- **Windows**: x86-64
3434

35-
> **Future Platforms:** `linux/arm64` and `windows/arm64` may be added in future releases if demand justifies the additional CI infrastructure.
35+
> **Future Platforms:** `windows/arm64` may be added in future releases if demand justifies it.
3636
3737
All platforms include a platform-specific bundled JRE - no external Java required!
3838

0 commit comments

Comments
 (0)