@@ -25,11 +25,38 @@ permissions:
2525
2626jobs :
2727 build :
28+ name : build (${{ matrix.name }})
2829 runs-on : ${{ matrix.os }}
2930
3031 strategy :
3132 matrix :
32- os : [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
33+ include :
34+ - name : ubuntu-latest
35+ dist_path : dist
36+ os : ubuntu-latest
37+ python : " 3.11"
38+ target : native
39+ - name : ubuntu-24.04-arm
40+ dist_path : dist
41+ os : ubuntu-24.04-arm
42+ python : " 3.11"
43+ target : native
44+ - name : macos-latest
45+ dist_path : dist
46+ os : macos-latest
47+ python : " 3.11"
48+ target : native
49+ - name : windows-latest
50+ dist_path : dist
51+ os : windows-latest
52+ python : " 3.11"
53+ target : native
54+ - name : pyodide
55+ dist_path : dist/pyodide
56+ os : ubuntu-latest
57+ python : " 3.14"
58+ target : pyodide
59+
3360
3461 steps :
3562 - name : Checkout
4067 - name : Setup Python
4168 uses : actions-ext/python/setup@6e1b91a408ea89f49bc8aff8724f83826f7b5446
4269 with :
43- version : " 3.11 "
70+ version : ${{ matrix.python }}
4471
4572 - name : Setup Rust
4673 uses : actions-ext/rust/setup@2db8e3e4c56beb7320c7d730bd2c2d6a6447bf6b
@@ -49,48 +76,57 @@ jobs:
4976 uses : actions-ext/node/setup@0ea5bdcd24d2488b28e16bf611b446a2f8e1e12f
5077 with :
5178 version : 22.x
79+ if : matrix.target == 'native'
5280
5381 - name : Install dependencies
5482 run : make develop
83+ if : matrix.target == 'native'
5584
5685 - name : Lint
5786 run : make lint
58- if : matrix.os == 'ubuntu-latest'
87+ if : matrix.name == 'ubuntu-latest'
5988
6089 - name : Checks
6190 run : make checks
62- if : matrix.os == 'ubuntu-latest'
91+ if : matrix.name == 'ubuntu-latest'
6392
6493 - name : Build
6594 run : make build
95+ if : matrix.target == 'native'
6696
6797 - name : Test
6898 run : make coverage
99+ if : matrix.target == 'native'
100+
101+ - name : Build and test Pyodide wheel
102+ run : make test-pyodide
103+ if : matrix.target == 'pyodide'
69104
70105 - name : Upload test results (Python)
71106 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
72107 with :
73- name : test-results-${{ matrix.os }}
108+ name : test-results-${{ matrix.name }}
74109 path : ' **/junit.xml'
75- if : matrix.os == 'ubuntu-latest'
110+ if : matrix.name == 'ubuntu-latest'
76111
77112 - name : Publish test results
78113 uses : EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0
79114 with :
80115 files : ' **/junit.xml'
81- if : matrix.os == 'ubuntu-latest'
116+ if : matrix.name == 'ubuntu-latest'
82117
83118 - name : Upload coverage
84119 uses : codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
85120 with :
86121 token : ${{ secrets.CODECOV_TOKEN }}
122+ if : matrix.target == 'native'
87123
88124 - name : Free disk space
89125 run : |
90126 sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/share/swift
91127 df -h /
92128 shell : bash
93- if : runner.os == 'Linux'
129+ if : matrix.target == 'native' && runner.os == 'Linux'
94130
95131 - name : Build distributions (Linux x86_64)
96132 run : |
@@ -102,7 +138,7 @@ jobs:
102138 shell : bash
103139 env :
104140 CIBW_ARCHS_LINUX : native
105- if : matrix.os == 'ubuntu-latest'
141+ if : matrix.name == 'ubuntu-latest'
106142
107143 - name : Build distributions (Linux ARM64)
108144 run : |
@@ -112,7 +148,7 @@ jobs:
112148 shell : bash
113149 env :
114150 CIBW_ARCHS_LINUX : native
115- if : matrix.os == 'ubuntu-24.04-arm'
151+ if : matrix.name == 'ubuntu-24.04-arm'
116152
117153 - name : Build distributions (macOS/Windows)
118154 run : |
@@ -122,22 +158,22 @@ jobs:
122158 shell : bash
123159 env :
124160 CIBW_ENVIRONMENT_MACOS : MACOSX_DEPLOYMENT_TARGET=11.0
125- if : runner.os != 'Linux'
161+ if : matrix.target == 'native' && runner.os != 'Linux'
126162
127163 - name : Test wheel
128164 uses : actions-ext/python/test-wheel@6e1b91a408ea89f49bc8aff8724f83826f7b5446
129165 with :
130166 module : python_template_rust
131- if : runner.os == 'Linux'
167+ if : matrix.target == 'native' && runner.os == 'Linux'
132168
133169 - name : Test source distribution
134170 uses : actions-ext/python/test-sdist@6e1b91a408ea89f49bc8aff8724f83826f7b5446
135171 with :
136172 module : python_template_rust
137- if : matrix.os == 'ubuntu-latest'
173+ if : matrix.name == 'ubuntu-latest'
138174
139175 - name : Upload distributions
140176 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
141177 with :
142- name : dist-${{ matrix.os }}
143- path : dist
178+ name : dist-${{ matrix.name }}
179+ path : ${{ matrix.dist_path }}
0 commit comments