Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add free-threaded wheel build to generate-ci by default #2329

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 78 additions & 14 deletions src/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,17 +376,29 @@ jobs:\n",
sccache: 'true'
"
));
match platform {
Platform::ManyLinux => {
conf.push_str(" manylinux: auto\n");
}
Platform::Musllinux => {
conf.push_str(" manylinux: musllinux_1_2\n");
}
Platform::Emscripten => {
conf.push_str(" rust-toolchain: nightly\n");
let maturin_action_args = match platform {
Platform::ManyLinux => "manylinux: auto",
Platform::Musllinux => "manylinux: musllinux_1_2",
Platform::Emscripten => "rust-toolchain: nightly",
_ => "",
};
if !maturin_action_args.is_empty() {
conf.push_str(&format!(" {maturin_action_args}\n"));
}
if is_abi3 {
// build free-threaded wheel for python3.13t
conf.push_str(&format!(
" - name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{{{ matrix.platform.target }}}}
args: --release --out dist{maturin_args} -i python3.13t
sccache: 'true'
"
));
if !maturin_action_args.is_empty() {
conf.push_str(&format!(" {maturin_action_args}\n"));
}
_ => {}
}
// upload wheels
let artifact_name = match platform {
Expand Down Expand Up @@ -904,6 +916,13 @@ mod tests {
args: --release --out dist
sccache: 'true'
manylinux: auto
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -935,6 +954,13 @@ mod tests {
args: --release --out dist
sccache: 'true'
manylinux: musllinux_1_2
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -962,7 +988,13 @@ mod tests {
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
Expand All @@ -988,7 +1020,13 @@ mod tests {
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
Expand Down Expand Up @@ -1081,6 +1119,13 @@ mod tests {
args: --release --out dist
sccache: 'true'
manylinux: auto
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -1112,6 +1157,13 @@ mod tests {
args: --release --out dist
sccache: 'true'
manylinux: musllinux_1_2
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -1139,7 +1191,13 @@ mod tests {
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
Expand All @@ -1165,7 +1223,13 @@ mod tests {
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
Expand Down
Loading