Skip to content

Commit 80b93b3

Browse files
authored
Update cross-platform-build-verification.yml
1 parent 0836449 commit 80b93b3

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/cross-platform-build-verification.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,28 @@ jobs:
144144

145145
- name: Test
146146
run: |
147-
# Create isolated test directory
148-
TEST_DIR=$(mktemp -d)
149-
trap "rm -rf $TEST_DIR" EXIT
147+
# For ARM64 emulation, use workspace subdirectory instead of temp dir
148+
# This avoids QEMU emulation issues with temporary directory mounting
149+
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
150+
TEST_DIR="${GITHUB_WORKSPACE}/.test-isolated-${{ matrix.distro }}"
151+
TEST_DIR="${TEST_DIR//:/}" # Remove colons from distro name
152+
mkdir -p "$TEST_DIR"
153+
trap "rm -rf $TEST_DIR" EXIT
154+
else
155+
TEST_DIR=$(mktemp -d)
156+
trap "rm -rf $TEST_DIR" EXIT
157+
fi
150158
151159
# Copy source to isolated test directory
152-
cp -r . $TEST_DIR/
160+
cp -r . "$TEST_DIR/"
153161
154162
if [[ "${{ matrix.distro }}" == *"alpine"* ]]; then SHELL="/bin/sh"; else SHELL="/bin/bash"; fi
155163
156164
# Use standard rootless Podman with label=disable to avoid SELinux issues
157-
# No userns flags needed - Podman's default rootless mode now works after storage cleanup
165+
# For ARM64 emulation, ensure the path is absolute and exists
158166
podman run --rm \
159167
--security-opt label=disable \
160-
-v $TEST_DIR:/workspace:rw \
168+
-v "$TEST_DIR:/workspace:rw" \
161169
--platform ${{ matrix.platform }} \
162170
${{ matrix.distro }} $SHELL -c "
163171
cd /workspace
@@ -177,7 +185,7 @@ jobs:
177185
omnipkg --version
178186
omnipkg list
179187
"
180-
188+
181189
# ═══════════════════════════════════════════════════════════════════
182190
# 3. DOCKER JOBS
183191
# ═══════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)