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.
 
 
 
 
 

99 lines
3.1 KiB

  1. name: build-wheels
  2. on:
  3. workflow_dispatch:
  4. branches:
  5. - master
  6. - extended
  7. jobs:
  8. many_linux_wheels:
  9. name: manylinux-wheels
  10. runs-on: ubuntu-latest
  11. container: quay.io/pypa/manylinux2014_x86_64
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Print System Information
  15. run: |
  16. echo "uname -a: $( uname -a )"
  17. cat /etc/issue
  18. echo "Shell: $SHELL"
  19. echo "Mount points:"; mount
  20. env
  21. - name: Chose Python version
  22. run: |
  23. ln -s /opt/python/cp39-cp39/bin/python3 /usr/local/bin/python3
  24. export PATH="/opt/python/cp39-cp39/bin:$PATH"
  25. - name: Install dependencies
  26. run: |
  27. yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
  28. yum install -y libacl-devel openssl-devel
  29. yum install -y librichacl-devel swig strace
  30. - name: Install python tools
  31. run: |
  32. python3 -m pip install pytest auditwheel
  33. - name: Build libarchive C sources
  34. run: |
  35. git clone https://github.com/libarchive/libarchive.git libarchive-src
  36. cd libarchive-src; git checkout 3.5
  37. mkdir build-libarchive; cd build-libarchive
  38. cmake ../
  39. make -j$(nproc); make install
  40. cd ../..
  41. - name: Compile pyhton modules
  42. run: |
  43. rm -rf build wheelhouse
  44. touch libarchive/_libarchive.i
  45. export LD_LIBRARY_PATH=/usr/local/lib64/:/usr/local/lib:$LD_LIBRARY_PATH
  46. export LIBARCHIVE_PREFIX=/usr/local
  47. python3 setup.py install
  48. - name: Build wheels
  49. run: |
  50. export LD_LIBRARY_PATH=/usr/local/lib64/:/usr/local/lib:$LD_LIBRARY_PATH
  51. export LIBARCHIVE_PREFIX=/usr/local
  52. python3 -m pip wheel --wheel-dir dist/ .
  53. auditwheel repair dist/*.whl
  54. python3 -m pip install --force-reinstall wheelhouse/*.whl
  55. - name: version
  56. run: |
  57. echo "::set-output name=version::$(python3 -c 'import libarchive; print(libarchive._libarchive.ARCHIVE_VERSION_STRING.split()[1])'')"
  58. id: version
  59. - uses: actions/upload-artifact@v3
  60. with:
  61. name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  62. path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  63. - name: release
  64. uses: actions/create-release@v1
  65. id: create_release
  66. with:
  67. draft: false
  68. prerelease: false
  69. release_name: ${{ steps.version.outputs.version }}
  70. tag_name: ${{ github.ref }}
  71. env:
  72. GITHUB_TOKEN: ${{ github.token }}
  73. - name: upload artifact
  74. uses: actions/upload-release-asset@v1
  75. env:
  76. GITHUB_TOKEN: ${{ github.token }}
  77. with:
  78. upload_url: ${{ steps.create_release.outputs.upload_url }}
  79. asset_path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  80. asset_name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  81. asset_content_type: application/zip