-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ede12bc
commit 111ebff
Showing
2 changed files
with
70 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Test | ||
name: Build package | ||
|
||
on: [push] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
@@ -10,7 +10,7 @@ jobs: | |
max-parallel: 4 | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.9', '3.10', '3.11'] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -64,3 +64,70 @@ jobs: | |
- name: Run tests | ||
run: | | ||
python -m pytest | ||
build_wheels: | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
pyver: [cp39, cp310, cp311, cp312] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{matrix.pyver}}-* | ||
CIBW_ARCHS_LINUX: auto | ||
CIBW_ARCHS_MACOS: auto universal2 | ||
CIBW_ARCHS_WINDOWS: auto | ||
# musllinux tests fail with some pid mixup | ||
# cross-build macos images can't be tested on this runner. | ||
CIBW_TEST_SKIP: >- | ||
*-* | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: ./wheelhouse/*.whl | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
needs: build_wheels | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
wheels/* | ||
upload_all: | ||
runs-on: ubuntu-latest | ||
needs: build_wheels | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 |
This file was deleted.
Oops, something went wrong.