-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Python 3.11 to the wheel matrix, remove 2.7 and 3.6
- tests are still done on 2.7 and 3.6 - update `actions/checkout` and `actions/setup-python` - use `pypa/cibuildwheel` for publishing
- Loading branch information
Showing
4 changed files
with
72 additions
and
97 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,92 +1,66 @@ | ||
name: Upload Python Package | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
push: | ||
release: | ||
types: [created] | ||
types: [published] | ||
|
||
jobs: | ||
deploy-linux: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Update submodules | ||
run: | | ||
git submodule update --init | ||
- name: Build manylinux Python wheels | ||
uses: RalfG/[email protected]_x86_64 | ||
with: | ||
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310' | ||
build-requirements: 'cython' | ||
system-packages: 'patchelf' | ||
- name: Publish wheels to PyPI | ||
if: github.event_name == 'release' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m pip install twine | ||
twine upload --skip-existing dist/*-manylinux*.whl | ||
deploy-macos: | ||
runs-on: macos-10.15 | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] | ||
os: [ubuntu-20.04, windows-2019, macos-11] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
curl -L https://github.com/casey/just/releases/download/v0.5.8/just-v0.5.8-x86_64-apple-darwin.tar.gz | tar -vzx just | ||
sudo mv just /usr/local/bin | ||
just script/unix/ci-bootstrap | ||
- name: Build wheels | ||
run: | | ||
just script/unix/ci-dist | ||
- name: Publish wheels to PyPI | ||
if: github.event_name == 'release' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m pip install twine | ||
twine upload --skip-existing dist/*.whl dist/*.tar.gz | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
deploy-windows: | ||
runs-on: windows-2019 | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*" | ||
CIBW_SKIP: "pp* *-musllinux* *_aarch64 *_ppc64le *_s390x *_i686 *_universal2" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
$JustVersion = "v0.5.8" | ||
Invoke-WebRequest -Uri https://github.com/casey/just/releases/download/$JustVersion/just-$JustVersion-x86_64-pc-windows-msvc.zip -OutFile just-$JustVersion-x86_64-pc-windows-msvc.zip | ||
Expand-Archive .\just-$JustVersion-x86_64-pc-windows-msvc.zip unzipped | ||
$Env:Path = (Join-Path (Get-Location) "unzipped") + ";" + $Env:Path | ||
just script/windows/ci-bootstrap | ||
- name: Build wheels | ||
run: | | ||
$Env:Path = (Join-Path (Get-Location) "unzipped") + ";" + $Env:Path | ||
just script/windows/ci-dist | ||
- name: Publish wheels to PyPI | ||
if: github.event_name == 'release' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m pip install twine | ||
twine upload --skip-existing dist/*.whl | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- 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 | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
skip_existing: true | ||
user: ${{ secrets.PYPI_USERNAME }} | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
# To test: repository_url: https://test.pypi.org/legacy/ |
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
description="tiny-AES-c wrapper in Cython", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
version="1.0.3", | ||
version="1.0.4rc1", | ||
author="Matteo Bertini", | ||
author_email="[email protected]", | ||
url="https://github.com/naufraghi/tinyaes-py", | ||
|
@@ -60,10 +60,6 @@ | |
# that you indicate whether you support Python 2, Python 3 or both. | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
# Source language | ||
"Programming Language :: Cython", | ||
], | ||
|