Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover pypi deployment #17

Merged
merged 11 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 24 additions & 15 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,40 @@ name: Build and deploy wheel
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
build_wheels:
name: Build wheels on ${{ matrix.os }} for ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os:
- ubuntu-latest
- macos-latest
python: ["cp38", "cp39", "cp310"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build binary wheels
uses: pypa/cibuildwheel@v2.3.1
uses: pypa/cibuildwheel@v2.16
with:
output-dir: dist
env:
# Linux settings
CIBW_ARCHS: auto64
CIBW_SKIP: "*musllinux*"
CIBW_BUILD: ${{matrix.python}}-*
CIBW_SKIP: pp* *musllinux*
# MacOS settings
MACOSX_DEPLOYMENT_TARGET: "10.14"
CIBW_ARCHS_MACOS: x86_64
# General
CIBW_TEST_REQUIRES: -r requirements-dev.txt
CIBW_TEST_COMMAND: pytest -v {project}/tests
- uses: actions/upload-artifact@v2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-${{matrix.python}}-${{ matrix.os }}
path: ./dist/*.whl

build_sdist:
Expand All @@ -38,26 +45,28 @@ jobs:
steps:
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install requirements
run: python -m pip install -r requirements-dev.txt
- name: Make sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
name: sdist
path: ./dist/*.tar.gz

upload-testpypi:
name: Upload wheels to TestPyPI
needs: [build-wheels, build_sdist]
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/[email protected]
- name: Publish to test.pypi.org
if: ${{ github.event_name == 'push' }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TESTPYPI_DEPLOY_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ bump2version>=1.0
numpy>=1.17
pytest>=6.1
tox>=4.0
setuptools>=69
Loading