Skip to content

Commit 8c972e0

Browse files
committed
Update github CI
1 parent 73242a4 commit 8c972e0

File tree

1 file changed

+87
-37
lines changed

1 file changed

+87
-37
lines changed

.github/workflows/CI.yml

Lines changed: 87 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is autogenerated by maturin v1.3.0
1+
# This file is autogenerated by maturin v1.7.0
22
# To update, run
33
#
44
# maturin generate-ci github
@@ -9,6 +9,7 @@ on:
99
push:
1010
branches:
1111
- main
12+
- master
1213
tags:
1314
- '*'
1415
pull_request:
@@ -19,101 +20,150 @@ permissions:
1920

2021
jobs:
2122
linux:
22-
runs-on: ubuntu-latest
23+
runs-on: ${{ matrix.platform.runner }}
2324
strategy:
2425
matrix:
25-
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
26+
platform:
27+
- runner: ubuntu-latest
28+
target: x86_64
29+
- runner: ubuntu-latest
30+
target: x86
31+
- runner: ubuntu-latest
32+
target: aarch64
33+
- runner: ubuntu-latest
34+
target: armv7
35+
- runner: ubuntu-latest
36+
target: s390x
37+
- runner: ubuntu-latest
38+
target: ppc64le
2639
steps:
27-
- uses: actions/checkout@v3
28-
- uses: actions/setup-python@v4
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
2942
with:
30-
python-version: '3.10'
43+
python-version: 3.x
3144
- name: Build wheels
3245
uses: PyO3/maturin-action@v1
3346
with:
34-
target: ${{ matrix.target }}
35-
args: --release --out dist
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --find-interpreter
3649
sccache: 'true'
3750
manylinux: auto
3851
- name: Upload wheels
39-
uses: actions/upload-artifact@v3
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: wheels-linux-${{ matrix.platform.target }}
55+
path: dist
56+
57+
musllinux:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: ubuntu-latest
63+
target: x86_64
64+
- runner: ubuntu-latest
65+
target: x86
66+
- runner: ubuntu-latest
67+
target: aarch64
68+
- runner: ubuntu-latest
69+
target: armv7
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: 3.x
75+
- name: Build wheels
76+
uses: PyO3/maturin-action@v1
77+
with:
78+
target: ${{ matrix.platform.target }}
79+
args: --release --out dist --find-interpreter
80+
sccache: 'true'
81+
manylinux: musllinux_1_2
82+
- name: Upload wheels
83+
uses: actions/upload-artifact@v4
4084
with:
41-
name: wheels
85+
name: wheels-musllinux-${{ matrix.platform.target }}
4286
path: dist
4387

4488
windows:
45-
runs-on: windows-latest
89+
runs-on: ${{ matrix.platform.runner }}
4690
strategy:
4791
matrix:
48-
target: [x64, x86]
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
- runner: windows-latest
96+
target: x86
4997
steps:
50-
- uses: actions/checkout@v3
51-
- uses: actions/setup-python@v4
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-python@v5
52100
with:
53-
python-version: '3.10'
54-
architecture: ${{ matrix.target }}
101+
python-version: 3.x
102+
architecture: ${{ matrix.platform.target }}
55103
- name: Build wheels
56104
uses: PyO3/maturin-action@v1
57105
with:
58-
target: ${{ matrix.target }}
59-
args: --release --out dist
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --find-interpreter
60108
sccache: 'true'
61109
- name: Upload wheels
62-
uses: actions/upload-artifact@v3
110+
uses: actions/upload-artifact@v4
63111
with:
64-
name: wheels
112+
name: wheels-windows-${{ matrix.platform.target }}
65113
path: dist
66114

67115
macos:
68-
runs-on: macos-latest
116+
runs-on: ${{ matrix.platform.runner }}
69117
strategy:
70118
matrix:
71-
target: [x86_64, aarch64]
119+
platform:
120+
- runner: macos-12
121+
target: x86_64
122+
- runner: macos-14
123+
target: aarch64
72124
steps:
73-
- uses: actions/checkout@v3
74-
- uses: actions/setup-python@v4
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-python@v5
75127
with:
76-
python-version: '3.10'
128+
python-version: 3.x
77129
- name: Build wheels
78130
uses: PyO3/maturin-action@v1
79131
with:
80-
target: ${{ matrix.target }}
81-
args: --release --out dist
132+
target: ${{ matrix.platform.target }}
133+
args: --release --out dist --find-interpreter
82134
sccache: 'true'
83135
- name: Upload wheels
84-
uses: actions/upload-artifact@v3
136+
uses: actions/upload-artifact@v4
85137
with:
86-
name: wheels
138+
name: wheels-macos-${{ matrix.platform.target }}
87139
path: dist
88140

89141
sdist:
90142
runs-on: ubuntu-latest
91143
steps:
92-
- uses: actions/checkout@v3
144+
- uses: actions/checkout@v4
93145
- name: Build sdist
94146
uses: PyO3/maturin-action@v1
95147
with:
96148
command: sdist
97149
args: --out dist
98150
- name: Upload sdist
99-
uses: actions/upload-artifact@v3
151+
uses: actions/upload-artifact@v4
100152
with:
101-
name: wheels
153+
name: wheels-sdist
102154
path: dist
103155

104156
release:
105157
name: Release
106158
runs-on: ubuntu-latest
107159
if: "startsWith(github.ref, 'refs/tags/')"
108-
needs: [linux, windows, macos, sdist]
160+
needs: [linux, musllinux, windows, macos, sdist]
109161
steps:
110-
- uses: actions/download-artifact@v3
111-
with:
112-
name: wheels
162+
- uses: actions/download-artifact@v4
113163
- name: Publish to PyPI
114164
uses: PyO3/maturin-action@v1
115165
env:
116166
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
117167
with:
118168
command: upload
119-
args: --non-interactive --skip-existing *
169+
args: --non-interactive --skip-existing wheels-*/*

0 commit comments

Comments
 (0)