|
9 | 9 | types: [created]
|
10 | 10 | pull_request:
|
11 | 11 |
|
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
12 | 16 | jobs:
|
13 | 17 | sdist:
|
14 | 18 | name: Build source distribution
|
15 | 19 | runs-on: ubuntu-latest
|
16 | 20 | steps:
|
17 |
| - - name: Check out repository |
18 |
| - uses: actions/checkout@v3 |
19 |
| - with: |
20 |
| - fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work |
21 |
| - - name: Install Python 3.x |
22 |
| - uses: actions/setup-python@v4 |
23 |
| - with: |
24 |
| - python-version: 3.x |
25 |
| - - name: Install setuptools |
26 |
| - run: pip install setuptools |
27 |
| - - name: Build sdist |
28 |
| - run: python setup.py sdist |
29 |
| - - name: Save sdist |
30 |
| - uses: actions/upload-artifact@v3 |
31 |
| - with: |
32 |
| - path: dist/*.tar.gz |
| 21 | + - name: Check out repository |
| 22 | + uses: actions/checkout@v4 |
| 23 | + with: |
| 24 | + fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work |
| 25 | + - name: Install Python 3.x |
| 26 | + uses: actions/setup-python@v5 |
| 27 | + with: |
| 28 | + python-version: 3.x |
| 29 | + - name: Install setuptools |
| 30 | + run: pip install setuptools |
| 31 | + - name: Build sdist |
| 32 | + run: python setup.py sdist |
| 33 | + - name: Save sdist |
| 34 | + uses: actions/upload-artifact@v4 |
| 35 | + with: |
| 36 | + name: cibw-sdist |
| 37 | + path: dist/*.tar.gz |
33 | 38 |
|
34 | 39 | wheels:
|
35 | 40 | name: Build wheels on ${{ matrix.os }} CIBW_BUILD=${{ matrix.cibw_build }}
|
36 | 41 | runs-on: ${{ matrix.os }}
|
37 | 42 | strategy:
|
| 43 | + # since multiple builds run at the same time, cancelling them all when one |
| 44 | + # fails is wasteful and forces handling build problems one by one instead |
| 45 | + # of showing a "full picture" |
| 46 | + fail-fast: false |
38 | 47 | matrix:
|
39 |
| - os: [ubuntu-latest, macOS-latest, windows-latest] |
40 |
| - cibw_build: [cp38-*, cp39-*, cp310-*, cp311-*, cp312-*] |
| 48 | + os: |
| 49 | + - ubuntu-latest |
| 50 | + - macos-13 # x86 |
| 51 | + - macos-latest # arm |
| 52 | + - windows-latest |
| 53 | + cibw_build: [cp39-*, cp310-*, cp311-*, cp312-*, cp313-*] |
41 | 54 | steps:
|
42 | 55 | - name: Check out repository
|
43 |
| - uses: actions/checkout@v3 |
| 56 | + uses: actions/checkout@v4 |
44 | 57 | with:
|
45 |
| - fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work |
| 58 | + fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work |
46 | 59 | - name: Install Python 3.x
|
47 |
| - uses: actions/setup-python@v4 |
| 60 | + uses: actions/setup-python@v5 |
48 | 61 | with:
|
49 | 62 | python-version: 3.x
|
50 |
| - - name: Set up QEMU # Needed to build aarch64 wheels |
| 63 | + - name: Set up QEMU # Needed to build aarch64 wheels |
51 | 64 | if: runner.os == 'Linux'
|
52 |
| - uses: docker/setup-qemu-action@v2 |
| 65 | + uses: docker/setup-qemu-action@v3 |
53 | 66 | with:
|
54 | 67 | platforms: all
|
55 | 68 | - name: Build wheels
|
56 |
| - uses: pypa/cibuildwheel@v2.16.2 |
| 69 | + uses: pypa/cibuildwheel@v2.21 |
57 | 70 | env:
|
58 | 71 | CIBW_ENVIRONMENT: PYLZ4_USE_SYSTEM_LZ4="False"
|
59 | 72 | CIBW_ARCHS_LINUX: "x86_64 i686 aarch64"
|
60 |
| - CIBW_ARCHS_MACOS: "x86_64 arm64" # universal2" |
| 73 | + CIBW_ARCHS_MACOS: "auto64" # since we have both runner arches |
61 | 74 | CIBW_ARCHS_WINDOWS: "AMD64 x86"
|
62 | 75 | CIBW_BUILD: ${{ matrix.cibw_build }}
|
63 | 76 | CIBW_SKIP: "cp*-musllinux*"
|
64 | 77 | CIBW_TEST_COMMAND: "tox -c {project}"
|
65 | 78 | CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-*linux_{aarch64,ppc64le,s390x}"
|
66 | 79 | CIBW_BEFORE_BUILD: "python -m pip install -U pip && python -m pip install tox"
|
67 | 80 | - name: Save wheels
|
68 |
| - uses: actions/upload-artifact@v2 |
| 81 | + uses: actions/upload-artifact@v4 |
69 | 82 | with:
|
| 83 | + name: cibw-wheels-${{ strategy.job-index }} |
70 | 84 | path: wheelhouse/*.whl
|
71 | 85 |
|
72 | 86 | upload_pypi:
|
|
75 | 89 | runs-on: ubuntu-latest
|
76 | 90 | if: startsWith(github.ref, 'refs/tags/')
|
77 | 91 | steps:
|
78 |
| - - uses: actions/download-artifact@v3 |
| 92 | + - uses: actions/download-artifact@v4 |
79 | 93 | with:
|
80 |
| - name: artifact |
| 94 | + pattern: cibw-* |
81 | 95 | path: dist
|
82 | 96 | - uses: pypa/gh-action-pypi-publish@release/v1
|
83 | 97 | with:
|
|
0 commit comments