-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: give unique names to wheel artifacts
- Loading branch information
Showing
1 changed file
with
27 additions
and
9 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 |
---|---|---|
|
@@ -8,7 +8,24 @@ on: | |
types: [created] | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -18,10 +35,11 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: python | ||
uses: actions/setup-python@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.11.2 | ||
|
||
|
@@ -30,18 +48,20 @@ jobs: | |
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '11' | ||
|
||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
# to supply options, put them in 'env', like: | ||
env: | ||
CIBW_SKIP: "*-musllinux_i686 cp36-* cp37-* pp37-*" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
|
||
deploy: | ||
needs: [build_wheels] | ||
needs: [build_sdist, build_wheels] | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
|
@@ -50,12 +70,10 @@ jobs: | |
- name: download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
pattern: cibw-* | ||
path: dist | ||
- name: build sdist | ||
run: python setup.py sdist | ||
merge-multiple: true | ||
|
||
- name: deploy | ||
uses: pypa/[email protected] | ||
with: | ||
|