-
Notifications
You must be signed in to change notification settings - Fork 52
86 lines (70 loc) · 2.78 KB
/
python-wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Python Wasm
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
pyodide-version: 0.24.1
defaults:
run:
shell: bash -leo pipefail {0} {0}
jobs:
itkwasm-python:
runs-on: ${{ matrix.os }}
env:
python-version: ${{ format('3.{0}', matrix.python-minor-version) }}
strategy:
max-parallel: 5
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
python-minor-version: [11, 12]
package: [compress-stringify, compare-images, dicom, mesh-io, image-io, downsample]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Free Disk Space (Ubuntu)
if: ${{ matrix.os == 'ubuntu-22.04' }}
uses: jlumbroso/free-disk-space@main
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Build build:gen:python
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" build:wasi
- name: Build bindgen:python
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" bindgen:python
- name: Build build:micromamba
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" build:micromamba
- name: Build build:python:wasi
if: ${{ matrix.os == 'ubuntu-22.04' || (matrix.package != 'mesh-io' && matrix.package != 'image-io' && matrix.package != 'downsample' ) }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" build:python:wasi
- name: Test python on system
if: ${{ matrix.os == 'ubuntu-22.04' || (matrix.package != 'mesh-io' && matrix.package != 'image-io' && matrix.package != 'downsample' ) }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:python:wasi
- uses: pyodide/pyodide-actions/install-browser@main
if: ${{ matrix.python-minor-version > 10 }}
with:
runner: selenium
browser: chrome
browser-version: latest
- name: Test python on chrome
if: ${{ matrix.python-minor-version > 10 && matrix.os == 'ubuntu-22.04' || (matrix.package != 'mesh-io' && matrix.package != 'image-io' && matrix.package != 'dicom' && matrix.os != 'macos-14' )}}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:python:emscripten