Skip to content

Commit d77961e

Browse files
committed
refactor: Use native runners for example tests (4 platforms)
Updated test-python-examples.yml to use native runners: - linux/amd64: ubuntu-latest (Docker build) - darwin/amd64: macos-13 (native build) - darwin/arm64: macos-latest (native build) - windows/amd64: windows-latest (native build) Removed linux/arm64 from example tests: - No native ARM64 runner available - QEMU emulation too slow (30-60 min → 2-4 hours) - linux/arm64 wheel still built, unit tested, and published to PyPI - Only example tests skipped (acceptable trade-off) Benefits: - True native testing on 4 platforms - Examples run in parallel (~30-60 min total, not sequential) - Proper platform-specific validation - Added Java setup for native builds (macOS/Windows) - Removed unnecessary QEMU/Docker setup for non-Linux platforms
1 parent 3f065bf commit d77961e

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

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

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,37 @@ on:
1414
jobs:
1515
test-examples:
1616
name: Test Python Examples (${{ matrix.platform }})
17-
runs-on: ubuntu-latest
17+
runs-on: ${{ matrix.runs-on }}
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
platform: [linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64]
21+
include:
22+
- platform: linux/amd64
23+
runs-on: ubuntu-latest
24+
- platform: darwin/amd64
25+
runs-on: macos-13
26+
- platform: darwin/arm64
27+
runs-on: macos-latest
28+
- platform: windows/amd64
29+
runs-on: windows-latest
30+
# Note: linux/arm64 wheel is built and published but examples not tested
31+
# (no native ARM64 runner available, QEMU emulation too slow for 30-60 min examples)
2232

2333
steps:
2434
- name: Checkout code
2535
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2636

27-
- name: Set up QEMU (for ARM64 emulation)
28-
if: contains(matrix.platform, 'arm64')
29-
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
30-
with:
31-
platforms: arm64
32-
33-
- name: Set up Docker Buildx
37+
- name: Set up Docker Buildx (Linux only)
38+
if: startsWith(matrix.platform, 'linux/')
3439
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
3540

41+
- name: Set up Java (for native builds on macOS/Windows)
42+
if: ${{ !startsWith(matrix.platform, 'linux/') }}
43+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
44+
with:
45+
distribution: 'temurin'
46+
java-version: '21'
47+
3648
- name: Build arcadedb-embedded (${{ matrix.platform }})
3749
run: |
3850
cd bindings/python
@@ -44,7 +56,7 @@ jobs:
4456
with:
4557
python-version: '3.11'
4658

47-
# Note: Java is NOT required - arcadedb-embedded has bundled JRE!
59+
# Note: Java is NOT required for end users - arcadedb-embedded has bundled JRE!
4860

4961
- name: Install ArcadeDB Python bindings
5062
run: |
@@ -261,9 +273,11 @@ jobs:
261273
if [ "${{ needs.test-examples.result }}" = "success" ]; then
262274
echo "✅ **All platforms passed example testing!**" >> $GITHUB_STEP_SUMMARY
263275
echo "" >> $GITHUB_STEP_SUMMARY
264-
echo "All examples ran successfully across all 5 platforms." >> $GITHUB_STEP_SUMMARY
276+
echo "All examples ran successfully across all tested platforms." >> $GITHUB_STEP_SUMMARY
277+
echo "" >> $GITHUB_STEP_SUMMARY
278+
echo "**Platforms tested**: linux/amd64, darwin/amd64, darwin/arm64, windows/amd64" >> $GITHUB_STEP_SUMMARY
265279
echo "" >> $GITHUB_STEP_SUMMARY
266-
echo "**Platforms tested**: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64" >> $GITHUB_STEP_SUMMARY
280+
echo "**Note**: linux/arm64 wheel is built and published but examples not tested (no native ARM64 runner, QEMU too slow)" >> $GITHUB_STEP_SUMMARY
267281
else
268282
echo "❌ **Some platforms failed example testing**" >> $GITHUB_STEP_SUMMARY
269283
echo "" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)