-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wheels: convert versions to match pypa spec, add uploading
* wheel versions now replace `+` with `.post` to match spec at https://packaging.python.org/en/latest/specifications/version-specifiers/ * CI updates: * disabled Windows for now and documented why * Added a new job to upload all wheels * Added new variable, `PYPI_INDEX`: fallback 'https://pypi.org/' if unset * Added new secret, `PYPI_TOKEN` * .editorconfig now uses 2 spaces for YML (it kept setting mine to tabs and GitHub Actions doesn't like that)
- Loading branch information
Showing
3 changed files
with
36 additions
and
11 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
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,8 +1,7 @@ | ||
name: Build Wheels for PyPI | ||
on: | ||
workflow_dispatch: | ||
push: | ||
# tags: ["yosys-*"] | ||
|
||
jobs: | ||
build_wheels: | ||
strategy: | ||
|
@@ -37,12 +36,15 @@ jobs: | |
runner: "macos-14", | ||
archs: "arm64", | ||
}, | ||
{ | ||
name: "Windows Server 2019", | ||
family: "windows", | ||
runner: "windows-2019", | ||
archs: "AMD64", | ||
}, | ||
## Windows is disabled because of an issue with compiling FFI as | ||
## under MinGW in the GitHub Actions environment (SHELL variable has | ||
## whitespace.) | ||
# { | ||
# name: "Windows Server 2019", | ||
# family: "windows", | ||
# runner: "windows-2019", | ||
# archs: "AMD64", | ||
# }, | ||
] | ||
name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }} | ||
runs-on: ${{ matrix.os.runner }} | ||
|
@@ -73,7 +75,7 @@ jobs: | |
brew install flex bison | ||
echo "PATH=$(brew --prefix flex)/bin:$PATH" >> $GITHUB_ENV | ||
echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV | ||
- if : ${{ matrix.os.family == 'windows' }} | ||
- if: ${{ matrix.os.family == 'windows' }} | ||
name: "[Windows] Flex/Bison" | ||
run: | | ||
choco install winflexbison3 | ||
|
@@ -86,7 +88,7 @@ jobs: | |
uses: pypa/[email protected] | ||
env: | ||
# * APIs not supported by PyPy | ||
# * Musllinux temporarily disabled because it takes too much time | ||
# * Musllinux disabled because it increases build time from 48m to ~3h | ||
CIBW_SKIP: > | ||
pp* | ||
*musllinux* | ||
|
@@ -111,4 +113,23 @@ jobs: | |
CIBW_TEST_COMMAND: python3 -c "from pyosys import libyosys as ys;d=ys.Design();ys.run_pass('help', d)" | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-wheels | ||
path: ./wheelhouse/*.whl | ||
upload_wheels: | ||
name: Upload Wheels | ||
runs-on: ubuntu-latest | ||
needs: build_wheels | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: python-wheels | ||
path: "." | ||
- run: | | ||
ls | ||
mkdir -p ./dist | ||
mv *.whl ./dist | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
repository-url: ${{ vars.PYPI_INDEX || 'https://pypi.org/' }} |
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