Skip to content

Commit a673beb

Browse files
authored
Update build.yaml to support build wheels for python 3.7
According to statistics, Python 3.7's current usage share still exceeds 20%. Since sqloxide itself supports Python 3.7, we hope to ensure support for it when building wheels.
1 parent 62a83d1 commit a673beb

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/build.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,31 @@ jobs:
1919
maturin-version: latest
2020
command: build
2121
manylinux: auto
22-
args: --release --sdist -i 3.8 3.9 3.10 3.11 3.12 3.13
22+
args: --release --sdist -i 3.7 3.8 3.9 3.10 3.11 3.12 3.13
2323
- uses: actions/upload-artifact@v4
2424
with:
2525
name: linux-wheels-${{ matrix.target }}
2626
path: target/wheels/
2727

2828
osx-wheels:
29-
runs-on: macos-latest
29+
runs-on: ${{ matrix.os }}
3030
strategy:
3131
matrix:
32-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
32+
include:
33+
- os: macos-13
34+
python-version: 3.7
35+
- os: macos-latest
36+
python-version: 3.8
37+
- os: macos-latest
38+
python-version: 3.9
39+
- os: macos-latest
40+
python-version: "3.10"
41+
- os: macos-latest
42+
python-version: "3.11"
43+
- os: macos-latest
44+
python-version: "3.12"
45+
- os: macos-latest
46+
python-version: "3.13"
3347
steps:
3448
- uses: actions/checkout@v1
3549
- uses: actions-rs/toolchain@v1
@@ -39,7 +53,14 @@ jobs:
3953
- uses: actions/setup-python@v2
4054
with:
4155
python-version: ${{ matrix.python-version }}
42-
- name: Build wheels
56+
- name: Build wheels for Python 3.7
57+
if: matrix.python-version == '3.7'
58+
run: |
59+
rustup target add aarch64-apple-darwin
60+
python3 -m pip install maturin
61+
maturin build --release --target universal2-apple-darwin
62+
- name: Build wheels for other Python versions
63+
if: matrix.python-version != '3.7'
4364
run: |
4465
python3 -m pip install maturin
4566
maturin build --release
@@ -52,7 +73,7 @@ jobs:
5273
runs-on: windows-latest
5374
strategy:
5475
matrix:
55-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
76+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
5677
steps:
5778
- uses: actions/checkout@v1
5879
- uses: actions-rs/toolchain@v1
@@ -91,12 +112,14 @@ jobs:
91112
- run: mv ./osx-3.10-wheel/* wheels
92113
- run: mv ./osx-3.9-wheel/* wheels
93114
- run: mv ./osx-3.8-wheel/* wheels
115+
- run: mv ./osx-3.7-wheel/* wheels
94116
- run: mv ./windows-3.13-wheel/* wheels
95117
- run: mv ./windows-3.12-wheel/* wheels
96118
- run: mv ./windows-3.11-wheel/* wheels
97119
- run: mv ./windows-3.10-wheel/* wheels
98120
- run: mv ./windows-3.9-wheel/* wheels
99121
- run: mv ./windows-3.8-wheel/* wheels
122+
- run: mv ./windows-3.7-wheel/* wheels
100123

101124

102125
- name: Publish a Python distribution to PyPI

0 commit comments

Comments
 (0)