Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
40 changes: 22 additions & 18 deletions .github/workflows/dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: dists
on:
pull_request:
push:
branches: '**' # not tags
branches: [master]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like being able to run CI on my branches without creating a PR. Does the '**' setting cause any problems?

Copy link
Collaborator Author

@ddelange ddelange Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the setting causes duplicate jobs for every commit pushed to a PR. i think what you're looking for is on: workflow_dispatch. we already added it in a previous PR: it adds a Run Workflow button on the right hand side here, where you can run CI manually on any branch without creating a PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

release:
types: [released, prereleased]
workflow_dispatch: # allows running workflow manually from the Actions tab
Expand All @@ -19,18 +19,18 @@ jobs:
fail-fast: false
matrix:
include:
- { os: macos-latest, target: x86_64 }
- { os: macos-latest, target: aarch64 }
- { os: ubuntu-latest, target: x86_64 }
- { os: ubuntu-latest, target: aarch64 }
- { os: ubuntu-latest, target: i686 }
- { os: ubuntu-latest, target: armv7 }
- { os: ubuntu-latest, target: ppc64le }
- { os: ubuntu-latest, target: s390x }
- { os: ubuntu-latest, target: x86_64, manylinux: musllinux_1_1 }
- { os: ubuntu-latest, target: aarch64, manylinux: musllinux_1_1 }
- { os: windows-latest, target: x86_64 }
- { os: windows-latest, target: i686 }
- { os: macos-15, target: x86_64 }
- { os: macos-15, target: aarch64 }
- { os: ubuntu-24.04, target: x86_64 }
- { os: ubuntu-24.04, target: aarch64 }
- { os: ubuntu-24.04, target: i686 }
- { os: ubuntu-24.04, target: armv7 }
- { os: ubuntu-24.04, target: ppc64le }
- { os: ubuntu-24.04, target: s390x }
- { os: ubuntu-24.04, target: x86_64, manylinux: musllinux_1_1 }
- { os: ubuntu-24.04, target: aarch64, manylinux: musllinux_1_1 }
- { os: windows-2025, target: x86_64 }
- { os: windows-2025, target: i686 }

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -41,18 +41,22 @@ jobs:
# pin to the latest supported python version
python-version: "3.13"
# x86 python needs to be available for the win32 wheel
architecture: ${{ ( matrix.os == 'windows-latest' && matrix.target == 'i686' ) && 'x86' || null }}
architecture: ${{ ( matrix.os == 'windows-2025' && matrix.target == 'i686' ) && 'x86' || null }}

- name: Add python lib to PATH
if: matrix.os == 'windows-2025'
run: Add-Content $env:GITHUB_PATH "${{ env.pythonLocation }}\lib"
Copy link
Collaborator Author

@ddelange ddelange Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something broke upstream in the past two weeks.

this is now necessary to get python313.lib discovered by maturin.

without this, we again hit PyO3/maturin-action#292:

fatal error LNK1181: cannot open input file 'python313.lib'

we encountered and fixed in #47 using generate-import-lib

now it manages to pass the 3.13 build again, but 3.13t is still red with LNK1181: ce73691 in this PR

both 3.13 and 3.13t were still working 2 weeks ago with all the same versions (maturin version, maturin-action version, pyo3 version, python 3.13.1 patch version): fc75159...4f172e2

tried both windows-2022 (no setup-python cache hit) and windows-2025 (python 3.13.1 cache hit), no difference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, we're green with 3.13t 🎉

turns out we don't need this Add python lib to PATH step. we need an explicit 3.13t distribution installed instead.


- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
# Keep in sync with tests.yml
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 3.13t'
args: --release --out dist --interpreter ${{ (matrix.os == 'windows-2025' && '3.8 3.9 3.10 3.11 3.12 3.13') || '3.8 3.9 3.10 3.11 3.12 3.13 3.13t' }}
rust-toolchain: stable
docker-options: -e CI

- run: ${{ (matrix.os == 'windows-latest' && 'dir') || 'ls -ltra' }} dist/
- run: ${{ (matrix.os == 'windows-2025' && 'dir') || 'ls -ltra' }} dist/

- uses: actions/upload-artifact@v4
with:
Expand All @@ -61,7 +65,7 @@ jobs:

sdist:
name: sdist
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -79,7 +83,7 @@ jobs:
publish:
if: github.event_name == 'release'
needs: [wheel, sdist]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

permissions:
contents: write # softprops/action-gh-release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on:
pull_request:
push:
branches: '**' # not tags
branches: [master]
workflow_dispatch: # allows running workflow manually from the Actions tab

concurrency: # https://stackoverflow.com/questions/66335225#comment133398800_72408109
Expand Down
Loading