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.
 
 
 
 
 

69 lines
1.8 KiB

  1. name: Deploy
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. env:
  7. libarchive_tag: v3.6.1
  8. jobs:
  9. deploy:
  10. name: Deploy to PyPI
  11. if: startsWith(github.ref, 'refs/tags')
  12. runs-on: ubuntu-latest
  13. container: quay.io/pypa/manylinux2014_x86_64
  14. steps:
  15. - name: Print System Information
  16. run: |
  17. echo "uname -a: $( uname -a )"
  18. cat /etc/issue
  19. echo "Shell: $SHELL"
  20. echo "Mount points:"; mount
  21. echo "nproc: $( nproc )"
  22. env
  23. - name: Chose Python version
  24. run: |
  25. ln -s /opt/python/cp39-cp39/bin/python3 /usr/local/bin/python3
  26. export PATH="/opt/python/cp39-cp39/bin:$PATH"
  27. - name: Install dependencies
  28. run: |
  29. yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
  30. yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel
  31. yum install -y librichacl-devel swig strace
  32. - name: Install python tools
  33. run: |
  34. python3 -m pip install pytest auditwheel
  35. - name: Build libarchive C sources
  36. run: |
  37. cd /tmp
  38. git clone https://github.com/libarchive/libarchive.git libarchive-src
  39. cd libarchive-src; git checkout ${{ env.libarchive_tag }}
  40. mkdir build-libarchive; cd build-libarchive
  41. cmake ../
  42. make -j$(nproc); make install
  43. cd $GITHUB_WORKSPACE
  44. - name: Check out code
  45. uses: actions/checkout@v3
  46. - name: SWIG and Compile python modules
  47. run: |
  48. touch libarchive/_libarchive.i
  49. make PYVER=3.9
  50. - name: Build wheels
  51. run: |
  52. python3 -m pip wheel --wheel-dir dist/ .
  53. auditwheel repair dist/*.whl
  54. - name: Deploy wheels to PyPI
  55. uses: pypa/gh-action-pypi-publish@release/v1
  56. with:
  57. password: ${{ secrets.PYPI_API_TOKEN }}
  58. wheel_files: wheelhouse/*.whl
  59. dry_run: true