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.
 
 
 
 
 

104 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 lz4-devel e2fsprogs-devel libb2-devel lzo-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: Prepare build environment
  45. run: |
  46. rm -rf build wheelhouse
  47. touch libarchive/_libarchive.i
  48. echo LD_LIBRARY_PATH=/usr/local/lib64/:/usr/local/lib:$LD_LIBRARY_PATH >>$GITHUB_ENV
  49. echo LIBARCHIVE_PREFIX=/usr/local >>$GITHUB_ENV
  50. - name: Compile pyhton modules
  51. run: |
  52. python3 setup.py install
  53. - name: Build wheels
  54. run: |
  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. echo "::set-output name=version::$(cd /tmp; python3 -c 'import libarchive; print(libarchive.version())')"
  61. id: version
  62. - uses: actions/upload-artifact@v3
  63. with:
  64. name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  65. path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  66. - name: release
  67. uses: actions/create-release@v1
  68. id: create_release
  69. with:
  70. draft: false
  71. prerelease: false
  72. release_name: Release ${{ steps.version.outputs.version }}
  73. tag_name: V${{ steps.version.outputs.version }}-${{ github.ref_name }}-${{ github.run_number }}
  74. env:
  75. GITHUB_TOKEN: ${{ github.token }}
  76. - name: upload artifact
  77. uses: actions/upload-release-asset@v1
  78. env:
  79. GITHUB_TOKEN: ${{ github.token }}
  80. with:
  81. upload_url: ${{ steps.create_release.outputs.upload_url }}
  82. asset_path: ./wheelhouse/python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  83. asset_name: python_libarchive_ext-${{ steps.version.outputs.version }}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  84. asset_content_type: application/zip