Browse Source

Intrgrate embedding of libarchive.so into the deploy workflow

test_fixup
Vadim Lebedev 2 years ago
parent
commit
bee9c49900
1 changed files with 49 additions and 7 deletions
  1. +49
    -7
      .github/workflows/deploy.yml

+ 49
- 7
.github/workflows/deploy.yml View File

@@ -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

Loading…
Cancel
Save