-
Notifications
You must be signed in to change notification settings - Fork 191
73 lines (65 loc) · 2.12 KB
/
wheels.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
name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build sdist
run: |
pipx run build --sdist
python3 -c "import pathlib,glob;pathlib.Path('GITHUB_ENV').write_text('SDIST_PATH' + glob.glob('dist/*.tar.gz')[0])"
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD:
"cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* pp39-* pp310-*"
CIBW_TEST_COMMAND: "python -m pymunk.tests"
CIBW_BUILD_VERBOSITY: 3
with:
package-dir: "$SDIST_PATH"
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
if: ${{ github.ref == 'refs/heads/master'}}
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
retention-days: 7
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
if:
${{ github.ref == 'refs/heads/master' && matrix.os == 'windows-2019'}}
with:
name: sdist-${{ matrix.os }}-${{ strategy.job-index }}
path: ./dist/*.tar.gz
retention-days: 7
build_wasm:
name: Build wheels for wasm / emscripten
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11.2"
- run: |
pip install pyodide-build>=0.23.3
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- run: pyodide build
env:
PYMUNK_BUILD_SLIM: 1
- uses: actions/upload-artifact@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
path: ./dist/*.whl
retention-days: 7