|
18 | 18 | types: |
19 | 19 | - published |
20 | 20 | workflow_dispatch: |
21 | | - inputs: |
22 | | - expectedVersion: |
23 | | - description: 'Expected version string' |
24 | | - required: true |
| 21 | + # Allow manually triggering, but do NOT upload the result |
25 | 22 | schedule: |
26 | 23 | # Nightly builds after weekdays |
27 | 24 | - cron: 0 2 * * 2-6 |
@@ -83,56 +80,35 @@ jobs: |
83 | 80 | with: |
84 | 81 | path: ./wheelhouse/*.whl |
85 | 82 |
|
86 | | - build_wheels_py3: |
87 | | - name: Build and test wheels on ${{ matrix.os }} (${{ matrix.archs }}) |
88 | | - runs-on: ${{ matrix.os }} |
89 | | - strategy: |
90 | | - matrix: |
91 | | - include: |
92 | | - - os: ubuntu-latest |
93 | | - archs: x86_64 i686 |
94 | | - - os: ubuntu-latest |
95 | | - archs: aarch64 |
96 | | - - os: windows-latest |
97 | | - archs: AMD64 x86 |
98 | | - - os: macos-latest |
99 | | - archs: x86_64 universal2 |
100 | | - steps: |
101 | | - - uses: actions/checkout@v3 |
102 | | - # Include all history and tags |
103 | | - with: |
104 | | - fetch-depth: 0 |
| 83 | + build_wheels_py36: |
| 84 | + uses: ./.github/workflows/build_python_3.yml |
| 85 | + with: |
| 86 | + cibw_build: 'cp36*' |
105 | 87 |
|
106 | | - - uses: actions/setup-python@v4 |
107 | | - name: Install Python |
108 | | - with: |
109 | | - python-version: '3.8' |
| 88 | + build_wheels_py37: |
| 89 | + uses: ./.github/workflows/build_python_3.yml |
| 90 | + with: |
| 91 | + cibw_build: 'cp37*' |
110 | 92 |
|
111 | | - - name: Set up QEMU |
112 | | - if: runner.os == 'Linux' |
113 | | - uses: docker/setup-qemu-action@v2 |
114 | | - with: |
115 | | - platforms: all |
| 93 | + build_wheels_py38: |
| 94 | + uses: ./.github/workflows/build_python_3.yml |
| 95 | + with: |
| 96 | + cibw_build: 'cp38*' |
116 | 97 |
|
117 | | - - name: Build wheels python 3.6 and above |
118 | | - |
119 | | - env: |
120 | | - # configure cibuildwheel to build native archs ('auto'), and some |
121 | | - # emulated ones |
122 | | - CIBW_ARCHS: ${{ matrix.archs }} |
123 | | - CIBW_BUILD: cp3* |
124 | | - # Run a smoke test on every supported platform |
125 | | - CIBW_TEST_COMMAND: python {project}/tests/smoke_test.py |
126 | | - # Testing arm on MacOS is currently not supported by Github |
127 | | - CIBW_TEST_SKIP: "*-macosx_universal2:arm64" |
128 | | - # Workaround for Macos 11.0 versioning issue, a.k.a. |
129 | | - # `platform.mac_ver()` reports incorrect MacOS version at 11.0 |
130 | | - # See: https://stackoverflow.com/a/65402241 |
131 | | - CIBW_ENVIRONMENT_MACOS: SYSTEM_VERSION_COMPAT=0 |
| 98 | + build_wheels_py39: |
| 99 | + uses: ./.github/workflows/build_python_3.yml |
| 100 | + with: |
| 101 | + cibw_build: 'cp39*' |
132 | 102 |
|
133 | | - - uses: actions/upload-artifact@v3 |
134 | | - with: |
135 | | - path: ./wheelhouse/*.whl |
| 103 | + build_wheels_py310: |
| 104 | + uses: ./.github/workflows/build_python_3.yml |
| 105 | + with: |
| 106 | + cibw_build: 'cp310*' |
| 107 | + |
| 108 | + build_wheels_py311: |
| 109 | + uses: ./.github/workflows/build_python_3.yml |
| 110 | + with: |
| 111 | + cibw_build: 'cp311*' |
136 | 112 |
|
137 | 113 | build_sdist: |
138 | 114 | name: Build source distribution |
@@ -187,24 +163,23 @@ jobs: |
187 | 163 | working-directory: / |
188 | 164 |
|
189 | 165 | upload_pypi: |
190 | | - needs: [build_wheels_py27_35, build_wheels_py3, test_alpine_sdist] |
| 166 | + needs: |
| 167 | + - build_wheels_py27_35 |
| 168 | + - build_wheels_py36 |
| 169 | + - build_wheels_py37 |
| 170 | + - build_wheels_py38 |
| 171 | + - build_wheels_py39 |
| 172 | + - build_wheels_py310 |
| 173 | + - build_wheels_py311 |
| 174 | + - test_alpine_sdist |
191 | 175 | runs-on: ubuntu-latest |
192 | | - if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch') |
| 176 | + if: (github.event_name == 'release' && github.event.action == 'published') |
193 | 177 | steps: |
194 | 178 | - uses: actions/download-artifact@v3 |
195 | 179 | with: |
196 | 180 | name: artifact |
197 | 181 | path: dist |
198 | 182 |
|
199 | | - - uses: actions/checkout@v3 |
200 | | - if: github.event_name == 'workflow_dispatch' |
201 | | - # Include all history and tags |
202 | | - with: |
203 | | - fetch-depth: 0 |
204 | | - - name: Validate deploy version |
205 | | - if: github.event_name == 'workflow_dispatch' |
206 | | - run: | |
207 | | - ./scripts/validate-version "${{ github.event.inputs.expectedVersion }}" |
208 | 183 | - uses: pypa/gh-action-pypi-publish@master |
209 | 184 | with: |
210 | 185 | user: __token__ |
|
0 commit comments