Skip to content

Commit 387ce38

Browse files
committed
fix(workflows): Add macOS Docker setup and Windows bash shell
- Add docker version check for macOS runners (Darwin platforms) Docker Desktop is available but may need verification - Add 'shell: bash' to build steps for Windows compatibility Windows runners default to PowerShell, need explicit bash shell - Both test and release workflows updated Fixes platform-specific build failures: - macOS: Docker availability verification - Windows: Bash script execution (was trying to parse as PowerShell)
1 parent 20c2c78 commit 387ce38

2 files changed

Lines changed: 34 additions & 17 deletions

File tree

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

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,19 @@ jobs:
7979
build:
8080
needs: [validate-version, test, test-examples] # Wait for validation and tests
8181
name: Build arcadedb-embedded (${{ matrix.platform }})
82-
runs-on: ubuntu-latest
82+
runs-on: ${{ matrix.runs-on }}
8383
environment: pypi
8484
strategy:
8585
matrix:
86-
platform: [linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64]
86+
include:
87+
- platform: linux/amd64
88+
runs-on: ubuntu-latest
89+
- platform: darwin/amd64
90+
runs-on: macos-13
91+
- platform: darwin/arm64
92+
runs-on: macos-latest
93+
- platform: windows/amd64
94+
runs-on: windows-latest
8795

8896
steps:
8997
- name: Checkout code
@@ -94,34 +102,36 @@ jobs:
94102
with:
95103
python-version: '3.11'
96104

97-
- name: Set up QEMU (for ARM64 emulation)
98-
if: contains(matrix.platform, 'arm64')
99-
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
105+
- name: Set up Java (for native builds on macOS/Windows)
106+
if: matrix.platform != 'linux/amd64'
107+
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
100108
with:
101-
platforms: arm64
109+
distribution: 'temurin'
110+
java-version: '21'
102111

103-
- name: Set up Docker Buildx
112+
- name: Set up Docker Buildx (Linux only)
113+
if: matrix.platform == 'linux/amd64'
104114
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
105115

106-
- name: Write version file for Docker build
116+
- name: Write version file for build
107117
run: |
108118
cd bindings/python
109-
# Use tag version directly - pass it to extract_version.py
119+
# Use tag version directly
110120
echo "${{ needs.validate-version.outputs.python-version }}" > .build_version.txt
111121
echo "📦 Building version: ${{ needs.validate-version.outputs.python-version }}"
112122
113123
- name: Build arcadedb-embedded (${{ matrix.platform }})
124+
shell: bash
114125
run: |
115126
cd bindings/python
116-
# Build script will use .build_version.txt if it exists
117127
./build.sh ${{ matrix.platform }}
118128
env:
119129
BUILD_VERSION: ${{ needs.validate-version.outputs.python-version }}
120130

121131
- name: Upload wheel artifact
122132
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
123133
with:
124-
name: wheel-${{ matrix.platform }}
134+
name: wheel-${{ matrix.platform == 'linux/amd64' && 'linux-amd64' || matrix.platform == 'darwin/amd64' && 'darwin-amd64' || matrix.platform == 'darwin/arm64' && 'darwin-arm64' || 'windows-amd64' }}
125135
path: bindings/python/dist/*.whl
126136
retention-days: 5
127137

@@ -146,12 +156,12 @@ jobs:
146156
echo "📦 Wheels:"
147157
ls dist/*.whl
148158
149-
# Count wheels (should be 5: one for each platform)
159+
# Count wheels (should be 4: one for each platform)
150160
WHEEL_COUNT=$(ls dist/*.whl | wc -l)
151-
echo "📊 Wheel count: $WHEEL_COUNT (expected: 5)"
161+
echo "📊 Wheel count: $WHEEL_COUNT (expected: 4)"
152162
153-
if [ "$WHEEL_COUNT" -ne 5 ]; then
154-
echo "❌ Expected 5 wheels (5 platforms), got $WHEEL_COUNT"
163+
if [ "$WHEEL_COUNT" -ne 4 ]; then
164+
echo "❌ Expected 4 wheels (4 platforms), got $WHEEL_COUNT"
155165
exit 1
156166
fi
157167
@@ -175,8 +185,6 @@ jobs:
175185
# Extract platform from filename
176186
if [[ "$WHEEL_NAME" == *"manylinux"*"x86_64"* ]]; then
177187
PLATFORM="linux/amd64"
178-
elif [[ "$WHEEL_NAME" == *"manylinux"*"aarch64"* ]]; then
179-
PLATFORM="linux/arm64"
180188
elif [[ "$WHEEL_NAME" == *"macosx"*"x86_64"* ]]; then
181189
PLATFORM="darwin/amd64"
182190
elif [[ "$WHEEL_NAME" == *"macosx"*"arm64"* ]]; then

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,20 @@ jobs:
4242
distribution: 'temurin'
4343
java-version: '21'
4444

45+
# Docker is needed on all platforms to download ArcadeDB JARs
46+
- name: Set up Docker (macOS)
47+
if: startsWith(matrix.platform, 'darwin/')
48+
run: |
49+
# Docker Desktop is pre-installed on macOS runners but may need to be started
50+
# GitHub's macos runners have Docker available
51+
docker version || echo "Docker not available"
52+
4553
- name: Set up Docker Buildx (Linux only)
4654
if: matrix.platform == 'linux/amd64'
4755
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
4856

4957
- name: Build and test arcadedb-embedded (${{ matrix.platform }})
58+
shell: bash
5059
run: |
5160
cd bindings/python
5261
echo "🔨 Building arcadedb-embedded for ${{ matrix.platform }}..."

0 commit comments

Comments
 (0)