Skip to content

Commit 7c1752a

Browse files
committed
feat: update shared asset extraction to use Python for improved reliability
1 parent 3400a1d commit 7c1752a

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,18 @@ jobs:
348348
path: ${{ runner.temp }}/example-shared-assets
349349

350350
- name: Extract shared example assets
351-
shell: bash
351+
shell: python
352352
run: |
353-
mkdir -p bindings/python/examples
354-
tar -xzf "$RUNNER_TEMP/example-shared-assets/example-shared-assets.tar.gz" -C bindings/python/examples
353+
import os
354+
import tarfile
355+
from pathlib import Path
356+
357+
archive_path = Path(os.environ["RUNNER_TEMP"]) / "example-shared-assets" / "example-shared-assets.tar.gz"
358+
target_dir = Path("bindings/python/examples")
359+
target_dir.mkdir(parents=True, exist_ok=True)
360+
361+
with tarfile.open(archive_path, "r:gz") as archive:
362+
archive.extractall(target_dir)
355363
356364
- name: Set up Java (for native builds on macOS/Windows)
357365
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'

0 commit comments

Comments
 (0)