Skip to content

Commit

Permalink
update deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Apr 23, 2021
1 parent 5ef0d84 commit 586b23c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .github/manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def compile_wheels(idx):
for pybin in glob('/opt/python/*/bin'):
# Requires Py3.6 or greater - on the docker image 3.5 is cp35-cp35m
if "35" not in pybin:
args = [path.join(pybin, 'pip'), 'wheel', '--no-deps', '-w', 'wheelhouse/']
args = [path.join(pybin, 'pip'), 'wheel', '--verbose', '--no-deps', '-w', 'wheelhouse/']
if idx is not None:
args.extend(['--extra-index-url', idx])
args.extend(['./'])
Expand Down Expand Up @@ -92,6 +92,8 @@ def run():

adjust_version(url)

if ARCH != "x86_64":
check_call(['sed', '-i', 's/, "cmake"//', 'pyproject.toml'])

compile_wheels(idx)

Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ on:
wip:
description: 'Publish work in progress package.'
required: false
default: true
default: 'true'
image:
description: 'Manylinux image to use.'
required: false
default: 'manylinux2014_x86_64'

jobs:
build_packages:
runs-on: ubuntu-latest
env:
PLAT: ${{ matrix.image }}

strategy:
matrix:
image:
- manylinux2014_x86_64
PLAT: ${{ github.event.inputs.image }}

steps:
- name: Checkout repo
Expand All @@ -28,19 +27,19 @@ jobs:
- name: Pull images
run: |
docker pull multiarch/qemu-user-static
docker pull quay.io/pypa/${{ matrix.image }}:latest
docker pull quay.io/pypa/${{ github.event.inputs.image }}:latest
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build wheels (wip)
if: ${{ github.event.inputs.wip }}
if: ${{ github.event.inputs.wip == 'true' }}
run: |
docker run --rm -e PLAT --workdir /github/workspace -v $GITHUB_WORKSPACE:/"/github/workspace" quay.io/pypa/${{ matrix.image }} /opt/python/cp38-cp38/bin/python ".github/manylinux.py"
docker run --rm -e PLAT --workdir /github/workspace -v $GITHUB_WORKSPACE:/"/github/workspace" quay.io/pypa/${{ github.event.inputs.image }} /opt/python/cp38-cp38/bin/python ".github/manylinux.py"
- name: Publish package to TestPyPI (wip)
if: ${{ github.event.inputs.wip }}
if: ${{ github.event.inputs.wip == 'true' }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand All @@ -49,12 +48,12 @@ jobs:
repository_url: https://test.pypi.org/legacy/

- name: Build wheels (release)
if: ${{ !github.event.inputs.wip }}
if: ${{ github.event.inputs.wip == 'false' }}
run: |
docker run --rm -e PLAT --workdir /github/workspace -v $GITHUB_WORKSPACE:/"/github/workspace" quay.io/pypa/${{ matrix.image }} /opt/python/cp38-cp38/bin/python ".github/manylinux.py" --release
docker run --rm -e PLAT --workdir /github/workspace -v $GITHUB_WORKSPACE:/"/github/workspace" quay.io/pypa/${{ github.event.inputs.image }} /opt/python/cp38-cp38/bin/python ".github/manylinux.py" --release
- name: Publish package to TestPyPI (release)
if: ${{ !github.event.inputs.wip }}
if: ${{ github.event.inputs.wip == 'false' }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down

0 comments on commit 586b23c

Please sign in to comment.