Skip to content

Commit

Permalink
update build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jhavl committed May 12, 2022
1 parent 42eb5b5 commit e31b40b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function repair_wheel {
cd ./io

# Compile wheels
for PYBIN in /opt/python/cp3[6-8]*/bin; do
for PYBIN in /opt/python/cp3[6-10]*/bin; do
"${PYBIN}/pip" install .
"${PYBIN}/pip" install pytest
"${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,28 @@ on:

jobs:
deploy:

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 2
matrix:
os: [ubuntu-latest]
python-version: [3.8]
os: [macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
ls ./dist/*.whl
twine upload dist/*.gz
twine upload dist/*.whl
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
ls ./dist/*.whl
twine upload dist/*.whl
40 changes: 40 additions & 0 deletions .github/workflows/python_publish_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a basic workflow that is manually triggered

name: Linux Build and Publish

on:
release:
types: [created]
workflow_dispatch:


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
# Runs a single command using the runners shell
- uses: actions/checkout@v2
- name: Make wheels
run: |
sudo docker run -e PLAT=manylinux2010_x86_64 -v ${{ github.workspace }}:/io quay.io/pypa/manylinux2010_x86_64 /io/.github/build-wheels.sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*.gz
twine upload wheelhouse/*manylinux*

0 comments on commit e31b40b

Please sign in to comment.