You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

61 lines
1.6 KiB

  1. name: Deploy
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. env:
  7. libarchive_tag: v3.6.1
  8. jobs:
  9. deploy:
  10. strategy:
  11. matrix:
  12. python_version: [3.8, 3.9, 3.10]
  13. name: Deploy to PyPI
  14. if: startsWith(github.ref, 'refs/tags')
  15. runs-on: ubuntu-latest
  16. container: quay.io/pypa/manylinux2014_x86_64
  17. steps:
  18. - name: Install dependencies
  19. run: |
  20. yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
  21. yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel
  22. yum install -y librichacl-devel swig strace
  23. - name: Setup Python
  24. uses: actions/setup-python@v2
  25. with:
  26. python-version: ${{ matrix.python_version }}
  27. - name: Install python tools
  28. run: |
  29. python3 -m pip install auditwheel
  30. - name: Build libarchive C sources
  31. run: |
  32. cd /tmp
  33. git clone https://github.com/libarchive/libarchive.git libarchive-src
  34. cd libarchive-src; git checkout ${{ env.libarchive_tag }}
  35. mkdir build-libarchive; cd build-libarchive
  36. cmake ../
  37. make -j$(nproc); make install
  38. cd $GITHUB_WORKSPACE
  39. - name: Check out code
  40. uses: actions/checkout@v3
  41. - name: SWIG and Compile python modules
  42. run: |
  43. touch libarchive/_libarchive.i
  44. make PYVER=${{ matrix.python_version }}
  45. - name: Build wheels
  46. run: |
  47. python3 -m pip wheel --wheel-dir dist/ .
  48. auditwheel repair dist/*.whl
  49. - name: Deploy wheels to PyPI
  50. uses: pypa/gh-action-pypi-publish@release/v1
  51. with:
  52. password: ${{ secrets.PYPI_API_TOKEN }}
  53. packages_dir: wheelhouse/