|
| 1 | +name: Build wheels workflow |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + |
| 10 | + create_release: |
| 11 | + runs-on: ubuntu-18.04 |
| 12 | + name: Create github release |
| 13 | + outputs: |
| 14 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 15 | + pkg_v: '0.1.9' |
| 16 | + steps: |
| 17 | + - name: Create Release |
| 18 | + id: create_release |
| 19 | + uses: actions/create-release@v1 |
| 20 | + env: |
| 21 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + with: |
| 23 | + tag_name: ${{ github.ref }} |
| 24 | + release_name: ${{ github.ref }} |
| 25 | + draft: false |
| 26 | + prerelease: false |
| 27 | + |
| 28 | + build_linux: |
| 29 | + needs: create_release |
| 30 | + runs-on: ubuntu-18.04 |
| 31 | + strategy: |
| 32 | + matrix: |
| 33 | + envs: [['manylinux2010_x86_64', ''], |
| 34 | + ['manylinux1_x86_64', ''], |
| 35 | + ['manylinux1_i686', 'linux32']] |
| 36 | + env: |
| 37 | + PLAT: ${{ matrix.envs[0] }} |
| 38 | + PRE_CMD: ${{ matrix.envs[1] }} |
| 39 | + name: Build wheels on linux |
| 40 | + steps: |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v1 |
| 43 | + - name: Install lzip |
| 44 | + run: sudo apt-get install -y lzip |
| 45 | + - name: Prepare build |
| 46 | + run: | |
| 47 | + ./contrib/install_linux.sh |
| 48 | + - name: Build wheels |
| 49 | + run: | |
| 50 | + source contrib/version_env.sh && ./contrib/script_linux.sh |
| 51 | + - name: Upload Release Asset Python3.6 |
| 52 | + uses: actions/upload-release-asset@v1 |
| 53 | + env: |
| 54 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + with: |
| 56 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 57 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp36-cp36m-${{ matrix.envs[0] }}.whl |
| 58 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp36-cp36m-${{ matrix.envs[0] }}.whl |
| 59 | + asset_content_type: application/zip |
| 60 | + - name: Upload Release Asset Python3.7 |
| 61 | + uses: actions/upload-release-asset@v1 |
| 62 | + env: |
| 63 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + with: |
| 65 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 66 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp37-cp37m-${{ matrix.envs[0] }}.whl |
| 67 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp37-cp37m-${{ matrix.envs[0] }}.whl |
| 68 | + asset_content_type: application/zip |
| 69 | + - name: Upload Release Asset Python3.8 |
| 70 | + uses: actions/upload-release-asset@v1 |
| 71 | + env: |
| 72 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + with: |
| 74 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 75 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp38-cp38-${{ matrix.envs[0] }}.whl |
| 76 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp38-cp38-${{ matrix.envs[0] }}.whl |
| 77 | + asset_content_type: application/zip |
| 78 | + |
| 79 | + build_osx_36: |
| 80 | + needs: create_release |
| 81 | + runs-on: macos-10.15 |
| 82 | + name: Build wheel on macOS Python3.6 |
| 83 | + env: |
| 84 | + PYTHON_VERSION: '3.6.8' |
| 85 | + steps: |
| 86 | + - name: Checkout |
| 87 | + uses: actions/checkout@v1 |
| 88 | + - name: Prepare build |
| 89 | + run: | |
| 90 | + ./contrib/install_osx.sh |
| 91 | + - name: Build wheel |
| 92 | + run: | |
| 93 | + source contrib/version_env.sh && ./contrib/script_osx.sh |
| 94 | + - name: Upload Release Asset |
| 95 | + uses: actions/upload-release-asset@v1 |
| 96 | + env: |
| 97 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 98 | + with: |
| 99 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 100 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp36-cp36m-macosx_10_6_intel.whl |
| 101 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp36-cp36m-macosx_10_6_intel.whl |
| 102 | + asset_content_type: application/zip |
| 103 | + |
| 104 | + build_osx_37: |
| 105 | + needs: create_release |
| 106 | + runs-on: macos-10.15 |
| 107 | + name: Build wheel on macOS Python3.7 |
| 108 | + env: |
| 109 | + PYTHON_VERSION: '3.7.6' |
| 110 | + steps: |
| 111 | + - name: Checkout |
| 112 | + uses: actions/checkout@v1 |
| 113 | + - name: Prepare build |
| 114 | + run: | |
| 115 | + ./contrib/install_osx.sh |
| 116 | + - name: Build wheel |
| 117 | + run: | |
| 118 | + source contrib/version_env.sh && ./contrib/script_osx.sh |
| 119 | + - name: Upload Release Asset |
| 120 | + uses: actions/upload-release-asset@v1 |
| 121 | + env: |
| 122 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + with: |
| 124 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 125 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp37-cp37m-macosx_10_6_intel.whl |
| 126 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp37-cp37m-macosx_10_6_intel.whl |
| 127 | + asset_content_type: application/zip |
| 128 | + |
| 129 | + build_osx_38: |
| 130 | + needs: create_release |
| 131 | + runs-on: macos-10.15 |
| 132 | + name: Build wheel on macOS Python3.8 |
| 133 | + env: |
| 134 | + PYTHON_VERSION: '3.8.6' |
| 135 | + steps: |
| 136 | + - name: Checkout |
| 137 | + uses: actions/checkout@v1 |
| 138 | + - name: Prepare build |
| 139 | + run: | |
| 140 | + ./contrib/install_osx.sh |
| 141 | + - name: Build wheel |
| 142 | + run: | |
| 143 | + source contrib/version_env.sh && ./contrib/script_osx.sh |
| 144 | + - name: Upload Release Asset |
| 145 | + uses: actions/upload-release-asset@v1 |
| 146 | + env: |
| 147 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 148 | + with: |
| 149 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 150 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-cp38-cp38-macosx_10_9_x86_64.whl |
| 151 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-cp38-cp38-macosx_10_9_x86_64.whl |
| 152 | + asset_content_type: application/zip |
| 153 | + |
| 154 | + build_win: |
| 155 | + needs: create_release |
| 156 | + runs-on: windows-2019 |
| 157 | + name: Build wheels on Win |
| 158 | + strategy: |
| 159 | + matrix: |
| 160 | + python-version: [[3.6, 'cp36-cp36m'], |
| 161 | + [3.7, 'cp37-cp37m'], |
| 162 | + [3.8, 'cp38-cp38']] |
| 163 | + python-arch: [['x86', 'win32'], ['x64', 'win_amd64']] |
| 164 | + env: |
| 165 | + PYVER1: ${{ matrix.python-version[1] }} |
| 166 | + PYARCH1: ${{ matrix.python-arch[1] }} |
| 167 | + steps: |
| 168 | + - name: Checkout |
| 169 | + uses: actions/checkout@v1 |
| 170 | + - name: Set up Python |
| 171 | + uses: actions/setup-python@v2 |
| 172 | + with: |
| 173 | + python-version: ${{ matrix.python-version[0] }} |
| 174 | + architecture: ${{ matrix.python-arch[0] }} |
| 175 | + - name: Prepare build |
| 176 | + shell: bash |
| 177 | + run: | |
| 178 | + choco install wget && ./contrib/install_win_ga.sh |
| 179 | + - name: Build wheels |
| 180 | + shell: bash |
| 181 | + run: | |
| 182 | + source contrib/version_env.sh && ./contrib/script_win_ga.sh |
| 183 | + - name: Upload Release Asset win32 python3.6 |
| 184 | + uses: actions/upload-release-asset@v1 |
| 185 | + env: |
| 186 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 187 | + with: |
| 188 | + upload_url: ${{ needs.create_release.outputs.upload_url }} |
| 189 | + asset_path: dist/python_bls-${{ needs.create_release.outputs.pkg_v }}-${{ matrix.python-version[1] }}-${{ matrix.python-arch[1] }}.whl |
| 190 | + asset_name: python_bls-${{ needs.create_release.outputs.pkg_v }}-${{ matrix.python-version[1] }}-${{ matrix.python-arch[1] }}.whl |
| 191 | + asset_content_type: application/zip |
0 commit comments