File: wheels.yml

package info (click to toggle)
fonttools 4.62.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,652 kB
  • sloc: python: 145,583; xml: 103; makefile: 24
file content (99 lines) | stat: -rw-r--r-- 2,920 bytes parent folder | download
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
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build + Deploy

on:
  push:
    tags: ["*.*.*"]
  # enables workflow to be run manually
  # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
  workflow_dispatch:

env:
  # skip binary wheels for pypy (preferable to use pure-python) and 32-bit Linux
  CIBW_SKIP: pp* cp*linux_i686
  CIBW_ENVIRONMENT: FONTTOOLS_WITH_CYTHON=1
  CIBW_TEST_REQUIRES: tox
  # only test core fonttools library without extras for now, stuff like lxml or scipy
  # create too many issues when testing on a large matrix of environments...
  CIBW_TEST_COMMAND: "tox -c {package}/tox.ini -e py-cy-noextra --installpkg {wheel}"

jobs:

  build_pure:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v6
    - name: Install uv
      uses: astral-sh/setup-uv@v7
    - name: Build source distribution and pure-python wheel
      run: |
        uv build
    - uses: actions/upload-artifact@v6
      with:
        name: pure
        path: |
          dist/*.whl
          dist/*.tar.gz

  build_wheels:
    name: ${{ matrix.type }} ${{ matrix.arch }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
    strategy:
      fail-fast: false
      # macos-15-intel runners are still x86_64, macos-14 (latest) are arm64; we want to build
      # the x86_64 wheel on/for x86_64 macs
      matrix:
        os: [macos-15-intel, windows-latest, ubuntu-latest]
        arch: [auto64]
        include:
          - os: macos-latest
            arch: universal2
          - os: windows-latest
            arch: auto32
          - os: ubuntu-24.04-arm
            arch: aarch64
    steps:
    - uses: actions/checkout@v6
      with:
        submodules: recursive
    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: "3.x"
    - name: Install dependencies
      run: pip install cibuildwheel

    - name: Build Wheels
      run: python -m cibuildwheel --output-dir wheelhouse .
      env:
        CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
        CIBW_ARCHS: ${{ matrix.arch }}
    - uses: actions/upload-artifact@v6
      with:
        name: wheels-${{ matrix.os }}-${{ matrix.arch }}
        path: wheelhouse/*.whl

  deploy:
    name: Upload to PyPI on tagged commit
    runs-on: ubuntu-latest
    needs:
      - build_pure
      - build_wheels
    # only run if the commit is tagged...
    if: startsWith(github.ref, 'refs/tags/')
    environment:
      name: publish-to-pypi
      url: https://pypi.org/p/fontTools
    permissions:
      id-token: write # IMPORTANT: mandatory for trusted publishing

    steps:
    - uses: actions/download-artifact@v7
      with:
        # so that all artifacts are downloaded in the same directory specified by 'path'
        merge-multiple: true
        path: dist
    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@v1.13.0