-
Notifications
You must be signed in to change notification settings - Fork 2
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
2d11176
commit 8f779f7
Showing
2 changed files
with
54 additions
and
46 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,24 +1,25 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: publish | ||
name: Build and Publish Package | ||
|
||
on: | ||
create: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build-manylinux: | ||
|
||
runs-on: ubuntu-latest | ||
build-wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
python-version: ['3.9'] | ||
os: [ubuntu-20.04, windows-2019, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
|
@@ -32,43 +33,50 @@ jobs: | |
- name: Test with pytest | ||
run: | | ||
make test | ||
- name: Build manylinux Python wheels | ||
uses: RalfG/[email protected]_x86_64 | ||
with: | ||
build-requirements: 'cython' | ||
- name: "Publish ManyLinux" | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir dist/ | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
run: | | ||
twine upload dist/*manylinux*.whl dist/*.tar.gz | ||
build-windows: | ||
runs-on: windows-latest | ||
CIBW_BUILD: "cp38* cp39* cp310*" | ||
CIBW_SKIP: "*_i686 *win32 *musllinux* pp*" | ||
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" | ||
CIBW_TEST_REQUIRES: "pytest" | ||
CIBW_BUILD_VERBOSITY: 5 | ||
CIBW_ARCHS: "auto" | ||
- name: Upload Distributions | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: | | ||
dist/*.whl | ||
dist/*.tar.gz | ||
dist/*.zip | ||
retention-days: 7 | ||
|
||
publish-wheels: | ||
needs: [build-wheels] | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
python-version: ['3.9'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
pip install pytest -U | ||
pip install Cython | ||
pip install --only-binary=numpy numpy -U | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
make test | ||
- name: "Windows" | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
run: | | ||
mkdir -p dist/ | ||
pip wheel --no-deps -w dist/ . | ||
twine upload dist/pynumpress*.whl | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip setuptools wheel twine | ||
- name: "Publish" | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
run: | | ||
ls -l dist/* | ||
twine upload dist/*.whl dist/*.tar.gz |
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