|
- name: Deploy
- on:
- push:
- tags:
- - '*'
- env:
- libarchive_tag: v3.6.1
-
- jobs:
- deploy:
- strategy:
- matrix:
- python_version: [3.8, 3.9, 3.10]
-
- name: Deploy to PyPI
- if: startsWith(github.ref, 'refs/tags')
- runs-on: ubuntu-latest
- container: quay.io/pypa/manylinux2014_x86_64
- steps:
- - name: Install dependencies
- run: |
- yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
- yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel
- yum install -y librichacl-devel swig strace
-
- - name: Setup Python
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python_version }}
- - name: Install python tools
- run: |
- python3 -m pip install auditwheel
-
- - name: Build libarchive C sources
- run: |
- cd /tmp
- git clone https://github.com/libarchive/libarchive.git libarchive-src
- cd libarchive-src; git checkout ${{ env.libarchive_tag }}
- mkdir build-libarchive; cd build-libarchive
- cmake ../
- make -j$(nproc); make install
- cd $GITHUB_WORKSPACE
-
- - name: Check out code
- uses: actions/checkout@v3
-
- - name: SWIG and Compile python modules
- run: |
- touch libarchive/_libarchive.i
- make PYVER=${{ matrix.python_version }}
-
- - name: Build wheels
- run: |
- python3 -m pip wheel --wheel-dir dist/ .
- auditwheel repair dist/*.whl
-
- - name: Deploy wheels to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
- packages_dir: wheelhouse/
|