|
1 | | -# Build wheel from source using tox. |
2 | | -name: build_wheel |
| 1 | +# Build Python wheels from source using cibuildwheel. |
| 2 | +name: build_wheels |
3 | 3 | on: [push, pull_request] |
4 | 4 | permissions: read-all |
5 | 5 | jobs: |
6 | | - build_wheel: |
7 | | - runs-on: ubuntu-latest |
| 6 | + build_wheels_linux: |
| 7 | + name: Build wheels on ${{ matrix.os }} |
| 8 | + runs-on: ${{ matrix.os }} |
8 | 9 | strategy: |
9 | 10 | matrix: |
10 | 11 | include: |
11 | | - - python-version: '3.10' |
12 | | - toxenv: 'py310' |
13 | | - - python-version: '3.11' |
14 | | - toxenv: 'py311' |
15 | | - - python-version: '3.12' |
16 | | - toxenv: 'py312' |
17 | | - - python-version: '3.13' |
18 | | - toxenv: 'py313' |
19 | | - - python-version: '3.14' |
20 | | - toxenv: 'py314' |
| 12 | + - os: ubuntu-24.04-arm |
| 13 | + - os: ubuntu-latest |
21 | 14 | steps: |
22 | | - - uses: actions/checkout@v4 |
| 15 | + - uses: actions/checkout@v5 |
23 | 16 | - name: Install build dependencies |
24 | 17 | run: | |
25 | | - sudo add-apt-repository universe |
26 | | - sudo add-apt-repository -y ppa:deadsnakes/ppa |
27 | | - sudo apt-get update |
28 | | - sudo apt-get install -y autoconf automake autopoint build-essential git libtool pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools |
29 | | - - name: Install tox |
| 18 | + sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config |
| 19 | + - name: Prepare build |
30 | 20 | run: | |
31 | | - python3 -m pip install tox |
32 | | - - name: Download test data |
| 21 | + ./synclibs.sh |
| 22 | + ./autogen.sh |
| 23 | + ./configure |
| 24 | + make sources >/dev/null |
| 25 | + - name: Build Python wheels |
| 26 | + uses: pypa/cibuildwheel@v3.3.0 |
| 27 | + env: |
| 28 | + CIBW_TEST_COMMAND: python tests/runtests.py |
| 29 | + CIBW_TEST_SOURCES: tests |
| 30 | + with: |
| 31 | + package-dir: . |
| 32 | + output-dir: dist |
| 33 | + - uses: actions/upload-artifact@v4 |
| 34 | + with: |
| 35 | + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 36 | + path: dist/*.whl |
| 37 | + build_wheels_macos: |
| 38 | + name: Build wheels on ${{ matrix.os }} |
| 39 | + runs-on: ${{ matrix.os }} |
| 40 | + strategy: |
| 41 | + matrix: |
| 42 | + include: |
| 43 | + - os: macos-14 |
| 44 | + - os: macos-15-intel |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v5 |
| 47 | + - name: Install build dependencies |
33 | 48 | run: | |
34 | | - if test -x "synctestdata.sh"; then ./synctestdata.sh; fi |
| 49 | + brew update -q |
| 50 | + brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true |
| 51 | + brew link --force gettext |
| 52 | + ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize |
35 | 53 | - name: Prepare build |
36 | 54 | run: | |
37 | | - ./synclibs.sh --use-head && ./autogen.sh && ./configure && make sources >/dev/null |
38 | | - - name: Build Python wheel |
| 55 | + ./synclibs.sh |
| 56 | + ./autogen.sh |
| 57 | + ./configure |
| 58 | + make sources >/dev/null |
| 59 | + - name: Build Python wheels |
| 60 | + uses: pypa/cibuildwheel@v3.3.0 |
| 61 | + env: |
| 62 | + CIBW_TEST_COMMAND: python tests/runtests.py |
| 63 | + CIBW_TEST_SOURCES: tests |
| 64 | + with: |
| 65 | + package-dir: . |
| 66 | + output-dir: dist |
| 67 | + - uses: actions/upload-artifact@v4 |
| 68 | + with: |
| 69 | + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 70 | + path: dist/*.whl |
| 71 | + build_wheels_windows: |
| 72 | + name: Build wheels on ${{ matrix.os }} |
| 73 | + runs-on: ${{ matrix.os }} |
| 74 | + strategy: |
| 75 | + matrix: |
| 76 | + include: |
| 77 | + - os: windows-11-arm |
| 78 | + - os: windows-latest |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v5 |
| 81 | + - name: Prepare build |
39 | 82 | run: | |
40 | | - tox -e${{ matrix.toxenv }} |
| 83 | + .\synclibs.ps1 |
| 84 | + .\autogen.ps1 |
| 85 | + - name: Build Python wheels |
| 86 | + uses: pypa/cibuildwheel@v3.3.0 |
| 87 | + env: |
| 88 | + CIBW_TEST_COMMAND: python tests/runtests.py |
| 89 | + CIBW_TEST_SOURCES: tests |
| 90 | + with: |
| 91 | + package-dir: . |
| 92 | + output-dir: dist |
| 93 | + - uses: actions/upload-artifact@v4 |
| 94 | + with: |
| 95 | + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 96 | + path: dist/*.whl |
0 commit comments