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.
 
 
 
 
 

105 lines
3.3 KiB

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