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.
 
 
 
 
 

98 lines
3.2 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. echo "nproc: $( nproc )"
  21. env
  22. - name: Chose Python version
  23. run: |
  24. ln -s /opt/python/cp39-cp39/bin/python3 /usr/local/bin/python3
  25. export PATH="/opt/python/cp39-cp39/bin:$PATH"
  26. - name: Install dependencies
  27. run: |
  28. yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
  29. yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel
  30. yum install -y librichacl-devel swig strace
  31. - name: Install python tools
  32. run: |
  33. python3 -m pip install pytest auditwheel
  34. - name: Build libarchive C sources
  35. run: |
  36. git clone https://github.com/libarchive/libarchive.git libarchive-src
  37. cd libarchive-src; git checkout 3.5
  38. mkdir build-libarchive; cd build-libarchive
  39. cmake ../
  40. make -j$(nproc); make install
  41. cd ../..
  42. - name: Compile pyhton modules
  43. run: |
  44. rm -rf build wheelhouse
  45. touch libarchive/_libarchive.i
  46. echo LD_LIBRARY_PATH=/usr/local/lib64/:/usr/local/lib:$LD_LIBRARY_PATH >>$GITHUB_ENV
  47. echo LIBARCHIVE_PREFIX=/usr/local >>$GITHUB_ENV
  48. python3 setup.py install
  49. - name: Build wheels
  50. run: |
  51. python3 -m pip wheel --wheel-dir dist/ .
  52. auditwheel repair dist/*.whl
  53. python3 -m pip install --force-reinstall wheelhouse/*.whl
  54. - name: version
  55. run: |
  56. echo "::set-output name=version::$(cd /tmp; python3 -c 'import libarchive; print(libarchive.version())')"
  57. id: version
  58. - uses: actions/upload-artifact@v3
  59. with:
  60. name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  61. path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  62. - name: release
  63. uses: actions/create-release@v1
  64. id: create_release
  65. with:
  66. draft: false
  67. prerelease: false
  68. release_name: Release ${{ steps.version.outputs.version }}
  69. tag_name: V${{ steps.version.outputs.version }}-${{ github.ref_name }}-${{ github.run_number }}
  70. env:
  71. GITHUB_TOKEN: ${{ github.token }}
  72. - name: upload artifact
  73. uses: actions/upload-release-asset@v1
  74. env:
  75. GITHUB_TOKEN: ${{ github.token }}
  76. with:
  77. upload_url: ${{ steps.create_release.outputs.upload_url }}
  78. asset_path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  79. asset_name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  80. asset_content_type: application/zip