|
|
@@ -3,24 +3,66 @@ on: |
|
|
|
push: |
|
|
|
tags: |
|
|
|
- '*' |
|
|
|
env: |
|
|
|
libarchive_tag: v3.6.1 |
|
|
|
|
|
|
|
jobs: |
|
|
|
deploy: |
|
|
|
name: Deploy to PyPI |
|
|
|
if: startsWith(github.ref, 'refs/tags') |
|
|
|
runs-on: ubuntu-latest |
|
|
|
container: quay.io/pypa/manylinux2014_x86_64 |
|
|
|
steps: |
|
|
|
- name: Setup python |
|
|
|
uses: actions/setup-python@v4 |
|
|
|
with: |
|
|
|
python-version: '3.8' |
|
|
|
- name: Print System Information |
|
|
|
run: | |
|
|
|
echo "uname -a: $( uname -a )" |
|
|
|
cat /etc/issue |
|
|
|
echo "Shell: $SHELL" |
|
|
|
echo "Mount points:"; mount |
|
|
|
echo "nproc: $( nproc )" |
|
|
|
env |
|
|
|
|
|
|
|
- name: Chose Python version |
|
|
|
run: | |
|
|
|
ln -s /opt/python/cp39-cp39/bin/python3 /usr/local/bin/python3 |
|
|
|
export PATH="/opt/python/cp39-cp39/bin:$PATH" |
|
|
|
|
|
|
|
- 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: Install python tools |
|
|
|
run: | |
|
|
|
python3 -m pip install pytest 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: Build the library |
|
|
|
run: python3 setup.py sdist |
|
|
|
- name: SWIG and Compile python modules |
|
|
|
run: | |
|
|
|
touch libarchive/_libarchive.i |
|
|
|
make PYVER=3.9 |
|
|
|
|
|
|
|
- name: Build wheels |
|
|
|
run: | |
|
|
|
python3 -m pip wheel --wheel-dir dist/ . |
|
|
|
auditwheel repair dist/*.whl |
|
|
|
|
|
|
|
- uses: pypa/gh-action-pypi-publish@release/v1 |
|
|
|
- name: Deploy wheels to PyPI |
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1 |
|
|
|
with: |
|
|
|
password: ${{ secrets.PYPI_API_TOKEN }} |
|
|
|
wheel_files: wheelhouse/*.whl |
|
|
|
dry_run: true |