8000 Update CI · python-lz4/python-lz4@d224898 · GitHub
[go: up one dir, main page]

Skip to content

Commit d224898

Browse files
committed
Update CI
- Updates all GH Actions to their latest versions - Removes Python 3.8 (EOL) - Adds Python 3.13 - Stops fail-fast to avoid wasting builds for a single failure
1 parent f8d7077 commit d224898

File tree

1 file changed

+42
-28
lines changed

1 file changed

+42
-28
lines changed

.github/workflows/build_dist.yml

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,78 @@ on:
99
types: [created]
1010
pull_request:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
sdist:
1418
name: Build source distribution
1519
runs-on: ubuntu-latest
1620
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
3338

3439
wheels:
3540
name: Build wheels on ${{ matrix.os }} CIBW_BUILD=${{ matrix.cibw_build }}
3641
runs-on: ${{ matrix.os }}
3742
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
3847
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-*]
4154
steps:
4255
- name: Check out repository
43-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
4457
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
4659
- name: Install Python 3.x
47-
uses: actions/setup-python@v4
60+
uses: actions/setup-python@v5
4861
with:
4962
python-version: 3.x
50-
- name: Set up QEMU # Needed to build aarch64 wheels
63+
- name: Set up QEMU # Needed to build aarch64 wheels
5164
if: runner.os == 'Linux'
52-
uses: docker/setup-qemu-action@v2
65+
uses: docker/setup-qemu-action@v3
5366
with:
5467
platforms: all
5568
- name: Build wheels
56-
uses: pypa/cibuildwheel@v2.16.2
69+
uses: pypa/cibuildwheel@v2.21
5770
env:
5871
CIBW_ENVIRONMENT: PYLZ4_USE_SYSTEM_LZ4="False"
5972
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
6174
CIBW_ARCHS_WINDOWS: "AMD64 x86"
6275
CIBW_BUILD: ${{ matrix.cibw_build }}
6376
CIBW_SKIP: "cp*-musllinux*"
6477
CIBW_TEST_COMMAND: "tox -c {project}"
6578
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-*linux_{aarch64,ppc64le,s390x}"
6679
CIBW_BEFORE_BUILD: "python -m pip install -U pip && python -m pip install tox"
6780
- name: Save wheels
68-
uses: actions/upload-artifact@v2
81+
uses: actions/upload-artifact@v4
6982
with:
83+
name: cibw-wheels-${{ strategy.job-index }}
7084
path: wheelhouse/*.whl
7185

7286
upload_pypi:
@@ -75,9 +89,9 @@ jobs:
7589
runs-on: ubuntu-latest
7690
if: startsWith(github.ref, 'refs/tags/')
7791
steps:
78-
- uses: actions/download-artifact@v3
92+
- uses: actions/download-artifact@v4
7993
with:
80-
name: artifact
94+
pattern: cibw-*
8195
path: dist
8296
- uses: pypa/gh-action-pypi-publish@release/v1
8397
with:

0 commit comments

Comments
 (0)
0