-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add action to build package * Fine, I'll bring my own constants * Continue trying to get things to build * Flail some more * Keep on tweaking * Pass artifacts around * Wait for artifacts to be built * Test publish * Try to get Test PyPI working * Let's try that again * Hello, GitHub, is this thing on? * Fail fast * One more time for the world * Only publish on push
- Loading branch information
Jordan Webb
authored
Apr 19, 2021
1 parent
7b62696
commit 8ee9f63
Showing
9 changed files
with
136 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
|
||
name: Build renameat2 | ||
|
||
jobs: | ||
manylinux: | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python: | ||
- cp36-cp36m | ||
- cp37-cp37m | ||
- cp38-cp38 | ||
- cp39-cp39 | ||
arch: | ||
- x86_64 | ||
- i686 | ||
- aarch64 | ||
|
||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build manylinux wheel | ||
run: | | ||
set -euo pipefail | ||
if [ "$ARCH" = "aarch64" ]; then | ||
export BASEPLAT=manylinux2014 | ||
fi | ||
docker-compose -f builder/docker-compose.yml build --pull | ||
docker-compose -f builder/docker-compose.yml run manylinux build-wheel.sh | ||
env: | ||
WHICH_PYTHON: ${{ matrix.python }} | ||
ARCH: ${{ matrix.arch }} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: github.event_name == 'push' | ||
with: | ||
name: ${{ matrix.python }}-${{ matrix.arch }} | ||
path: dist/*.whl | ||
|
||
|
||
sdist: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build sdist | ||
run: | | ||
set -euo pipefail | ||
docker-compose -f builder/docker-compose.yml build --pull | ||
docker-compose -f builder/docker-compose.yml run manylinux /opt/python/cp36-cp36m/bin/python3 setup.py sdist | ||
- uses: actions/upload-artifact@v2 | ||
if: github.event_name == 'push' | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
|
||
testpypi: | ||
runs-on: ubuntu-20.04 | ||
if: github.event_name == 'push' | ||
|
||
needs: | ||
- manylinux | ||
- sdist | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: ./artifacts | ||
|
||
- name: Rearrange artifacts | ||
run: | | ||
mkdir -p dist | ||
mv ./artifacts/*/* dist/ | ||
- name: Publish package to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
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
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
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
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,17 +1,6 @@ | ||
from setuptools import setup | ||
|
||
# setup.cfg seems to be working but I'm old and still don't trust it | ||
# setup( | ||
# name="renameat2", | ||
# version="1.0.0", | ||
# author="Jordan Webb", | ||
# author_email="[email protected]", | ||
# description="A wrapper around Linux's renameat2 system call", | ||
# url="https://github.com/jordemort/python-renameat2", | ||
# packages=["renameat2"], | ||
# setup_requires=["cffi>=1.0.0"], | ||
# cffi_modules=["renameat2_build.py:ffibuilder"], | ||
# python_requires=">=3.6", | ||
# ) | ||
|
||
setup(cffi_modules=["renameat2_build.py:ffibuilder"], use_scm_version=True) | ||
setup( | ||
cffi_modules=["renameat2_build.py:ffibuilder"], | ||
use_scm_version={"local_scheme": "no-local-version"}, | ||
) |