@@ -4,55 +4,114 @@ on: [push, pull_request]
44
55jobs :
66 build_wheels :
7- name : Build wheels for ${{ matrix.os }}
7+ name : ${{ matrix.name }}
88 runs-on : ${{ matrix.os }}
99 continue-on-error : true
1010 strategy :
1111 fail-fast : false
1212 matrix :
13- os : [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, windows-11-arm, macos-15-intel, macos-14]
13+ include :
14+ - name : Build manylinux x86-64 wheels
15+ os : ubuntu-22.04
16+ kind : native
17+ artifact_name : wheels-ubuntu-22.04
18+ cibw_platform : auto
19+ cibw_build : " *"
20+ - name : Build manylinux arm64 wheels
21+ os : ubuntu-22.04-arm
22+ kind : native
23+ artifact_name : wheels-ubuntu-22.04-arm
24+ cibw_platform : auto
25+ cibw_build : " *"
26+ - name : Build Windows x86-64 wheels
27+ os : windows-2022
28+ kind : native
29+ artifact_name : wheels-windows-2022
30+ cibw_platform : auto
31+ cibw_build : " *"
32+ - name : Build Windows arm64 wheels
33+ os : windows-11-arm
34+ kind : native
35+ artifact_name : wheels-windows-11-arm
36+ cibw_platform : auto
37+ cibw_build : " *"
38+ - name : Build macOS x86-64 wheels
39+ os : macos-15-intel
40+ kind : native
41+ artifact_name : wheels-macos-15-intel
42+ cibw_platform : auto
43+ cibw_build : " *"
44+ - name : Build macOS arm64 wheels
45+ os : macos-14
46+ kind : native
47+ artifact_name : wheels-macos-14
48+ cibw_platform : auto
49+ cibw_build : " *"
50+ - name : Build Pyodide wheels
51+ os : ubuntu-22.04
52+ kind : pyodide
53+ artifact_name : wheels-pyodide
54+ emscripten_version : 4.0.9
55+ cibw_platform : pyodide
56+ cibw_build : cp313-*
1457
1558 steps :
1659 - uses : actions/checkout@v6.0.2
1760
18- - uses : actions/setup-python@v6
61+ - if : ${{ matrix.kind == 'native' }}
62+ uses : actions/setup-python@v6
1963 with :
2064 python-version : ' 3.13'
2165
22- - uses : msys2/setup-msys2@v2.30.0
66+ # -------------- Windows stuff ---------------- #
67+
68+ - if : ${{ matrix.os == 'windows-2022' }}
69+ uses : msys2/setup-msys2@v2.30.0
2370 with :
2471 msystem : ucrt64
2572 update : true
26- if : ${{ matrix.os == 'windows-2022' }}
2773
28- - uses : msys2/setup-msys2@v2.30.0
74+ - if : ${{ matrix.os == 'windows-11-arm' }}
75+ uses : msys2/setup-msys2@v2.30.0
2976 with :
3077 msystem : clangarm64
3178 update : true
32- if : ${{ matrix.os == 'windows-11-arm' }}
3379
3480 # Install pkgconfig on Windows from choco rather than from msys and
3581 # avoid using the Strawberry one.
36- - run : choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
37- if : ${{ startsWith( matrix.os , 'windows' ) }}
82+ - if : ${{ startsWith( matrix.os , 'windows' ) }}
83+ run : choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
3884
3985 # We have to set this here rather than in the cibuildwheel config
4086 # This is probably something to do with \ vs / in paths...
41- - run : |
87+ - if : ${{ startsWith( matrix.os , 'windows' ) }}
88+ run : |
4289 $pkgConfigPath = "${{ github.workspace }}/.local/lib/pkgconfig"
4390 $pkgConfigPath = $pkgConfigPath.Replace('\', '/')
4491 echo "PKG_CONFIG_PATH=$pkgConfigPath" >> $env:GITHUB_ENV
45- if: ${{ startsWith( matrix.os , 'windows' ) }}
92+
93+ # ------------- pyodide ------------- #
94+
95+ - if : ${{ matrix.kind == 'pyodide' }}
96+ name : Set up Emscripten toolchain
97+ uses : mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
98+ with :
99+ version : ${{ matrix.emscripten_version }}
100+ actions-cache-folder : emsdk-cache
101+
102+ # ------------- actual build ------------- #
46103
47104 - name : Build wheels
48105 uses : pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
49106 env :
107+ CIBW_PLATFORM : ${{ matrix.cibw_platform }}
108+ CIBW_BUILD : ${{ matrix.cibw_build }}
50109 # override setting in pyproject.toml to use msys2 instead of msys64 bash
51110 CIBW_BEFORE_ALL_WINDOWS : ${{ matrix.os == 'windows-11-arm' && 'msys2 -c bin/cibw_before_all_windows_arm64.sh' || 'msys2 -c bin/cibw_before_all_windows_amd64.sh' }}
52111
53112 - uses : actions/upload-artifact@v7
54113 with :
55- name : wheels- ${{ matrix.os }}
114+ name : ${{ matrix.artifact_name }}
56115 path : wheelhouse/*.whl
57116
58117 build_sdist :
@@ -120,6 +179,37 @@ jobs:
120179
121180 - run : python -m flint.test --verbose
122181
182+ test_pyodide :
183+ needs : build_wheels
184+ name : Test Pyodide wheel
185+ runs-on : ubuntu-22.04
186+ env :
187+ PYODIDE_VERSION : 0.28.2
188+
189+ steps :
190+ - uses : actions/setup-python@v6
191+ with :
192+ python-version : ' 3.13'
193+
194+ - uses : actions/setup-node@v6
195+ with :
196+ node-version : ' 22'
197+
198+ - run : pip install "pyodide-build==${{ env.PYODIDE_VERSION }}"
199+ - run : pyodide xbuildenv install "${{ env.PYODIDE_VERSION }}"
200+
201+ - uses : actions/download-artifact@v8
202+ with :
203+ name : wheels-pyodide
204+ path : wheelhouse
205+
206+ - run : |
207+ pyodide venv .venv-pyodide
208+ source .venv-pyodide/bin/activate
209+ pip install wheelhouse/*.whl
210+ pip install pytest hypothesis
211+ python -m pytest -svra -p no:cacheprovider --pyargs flint
212+
123213 # On new enough Ubuntu we can build against the system deb.
124214 test_pip_flint_deb :
125215 name : Build on ${{ matrix.os }}
0 commit comments