mirror of
https://github.com/capnproto/pycapnp.git
synced 2025-03-04 16:35:04 +01:00
75 lines
2.8 KiB
YAML
75 lines
2.8 KiB
YAML
name: manylinux2010
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
manylinux2010:
|
|
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container-image }}
|
|
strategy:
|
|
matrix:
|
|
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
|
|
container-image: ['quay.io/pypa/manylinux2010_x86_64', 'quay.io/pypa/manylinux2010_i686']
|
|
|
|
steps:
|
|
# NOTE: Cannot use checkout@v2 as it requires a newer version glibc, but that's not possible with manylinux without a secondary sysroot
|
|
- uses: actions/checkout@v1
|
|
# capnproto build requires cmake 3+, CentOS 6 (manylinux2010) defaults to cmake 2.8
|
|
- name: Install dependencies
|
|
run: |
|
|
yum install -y cmake3 ninja-build
|
|
ln -sf /usr/bin/cmake3 /usr/local/bin/cmake
|
|
ln -s /usr/bin/ninja-build /usr/local/bin/ninja
|
|
/opt/python/${{ matrix.python-version }}/bin/python -m pip install -r requirements.txt
|
|
/opt/python/${{ matrix.python-version }}/bin/python -m pip install auditwheel
|
|
- name: Build pycapnp and install
|
|
env:
|
|
LDFLAGS: -Wl,--no-as-needed -lrt
|
|
run: |
|
|
/opt/python/${{ matrix.python-version }}/bin/python setup.py build
|
|
- name: Packaging
|
|
run: |
|
|
/opt/python/${{ matrix.python-version }}/bin/python setup.py bdist_wheel
|
|
/opt/python/${{ matrix.python-version }}/bin/python setup.py sdist
|
|
/opt/python/${{ matrix.python-version }}/bin/auditwheel repair dist/*linux_*.whl
|
|
- uses: actions/upload-artifact@v1.0.0
|
|
with:
|
|
name: manylinux2010_dist
|
|
path: wheelhouse
|
|
|
|
manylinux2014:
|
|
name: "manylinux2014( ${{ matrix.python-version }}, quay.io/pypa/manylinux2014_aarch64)"
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
|
|
fail-fast: false
|
|
env:
|
|
py: /opt/python/${{ matrix.python-version }}/bin/python
|
|
img: quay.io/pypa/manylinux2014_aarch64
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v1
|
|
- name: Building pycapnp and packaging
|
|
run: |
|
|
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
|
|
${{ env.img }} \
|
|
bash -exc '${{ env.py }} -m venv .env && \
|
|
source .env/bin/activate && \
|
|
echo "Install Dependencies" && \
|
|
python -m pip install -r requirements.txt && \
|
|
python -m pip install auditwheel && \
|
|
echo "Build pycapnp and install" && \
|
|
python setup.py build && \
|
|
echo "Packaging" && \
|
|
python setup.py bdist_wheel && \
|
|
python setup.py sdist && \
|
|
auditwheel repair dist/*linux_*.whl && \
|
|
deactivate'
|
|
- uses: actions/upload-artifact@v1.0.0
|
|
with:
|
|
name: manylinux2014_dist
|
|
path: wheelhouse
|