|
61 | 61 | name: Linux_aarch64_3.${{ matrix.python3-version }}_wheel |
62 | 62 | path: wheelhouse/ |
63 | 63 |
|
| 64 | + build_macos_x86_wheels: |
| 65 | + name: Build macos x86 wheels |
| 66 | + runs-on: macos-15-intel |
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + python-version: ['3.10', '3.11', '3.12'] |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v5 |
| 72 | + with: |
| 73 | + fetch-depth: '0' |
| 74 | + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* |
| 75 | + - name: Set up Python ${{ matrix.python-version }} |
| 76 | + uses: actions/setup-python@v6 |
| 77 | + with: |
| 78 | + python-version: ${{ matrix.python-version }} |
| 79 | + - name: Install conan |
| 80 | + uses: turtlebrowser/[email protected] |
| 81 | + - name: Set up conan |
| 82 | + run: | |
| 83 | + conan profile detect |
| 84 | + DEFAULT_PROFILE_PATH=`conan profile path default` |
| 85 | + PROFILE_PATH=./conan-profiles/macos-15-intel |
| 86 | + diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true |
| 87 | + cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} |
| 88 | + conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 |
| 89 | + - name: Build tket C++ |
| 90 | + run: conan create tket --user tket --channel stable --build=missing -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" |
| 91 | + - name: Build wheel |
| 92 | + run: | |
| 93 | + cd pytket |
| 94 | + # Ensure wheels are compatible with MacOS 13.0 and later: |
| 95 | + export WHEEL_PLAT_NAME=macosx_13_0_x86_64 |
| 96 | + pip install -U pip build delocate |
| 97 | + TKET_VERSION=`cat ../TKET_VERSION` python -m build |
| 98 | + delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl" |
| 99 | + - uses: actions/upload-artifact@v4 |
| 100 | + with: |
| 101 | + name: MacOS_x86_${{ matrix.python-version }}_wheel |
| 102 | + path: wheelhouse/ |
| 103 | + |
64 | 104 | build_macos_arm64_wheels: |
65 | 105 | name: Build macos arm64 wheels |
66 | 106 | runs-on: macos-26 |
@@ -217,6 +257,43 @@ jobs: |
217 | 257 | - name: Run tests |
218 | 258 | run: cd tket/pytket/tests && pytest --ignore=simulator/ |
219 | 259 |
|
| 260 | + test_macos_x86_wheels: |
| 261 | + name: Test macos x86 wheels |
| 262 | + needs: build_macos_x86_wheels |
| 263 | + strategy: |
| 264 | + matrix: |
| 265 | + os: ['macos-15-intel'] |
| 266 | + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] |
| 267 | + runs-on: ${{ matrix.os }} |
| 268 | + steps: |
| 269 | + - name: Set up Python ${{ matrix.python-version }} |
| 270 | + uses: actions/setup-python@v6 |
| 271 | + with: |
| 272 | + python-version: ${{ matrix.python-version }} |
| 273 | + - name: Download wheel (non-stable-ABI) |
| 274 | + if: matrix.python-version == '3.10' || matrix.python-version == '3.11' |
| 275 | + uses: actions/download-artifact@v5 |
| 276 | + with: |
| 277 | + name: MacOS_x86_${{ matrix.python-version }}_wheel |
| 278 | + path: wheelhouse/ |
| 279 | + - name: Download wheel (stable-ABI) |
| 280 | + if: matrix.python-version == '3.12' || matrix.python-version == '3.13' || matrix.python-version == '3.14' |
| 281 | + uses: actions/download-artifact@v5 |
| 282 | + with: |
| 283 | + name: MacOS_x86_3.12_wheel |
| 284 | + path: wheelhouse/ |
| 285 | + - uses: actions/checkout@v5 |
| 286 | + with: |
| 287 | + path: tket |
| 288 | + - name: Install wheel |
| 289 | + run: | |
| 290 | + pip install $GITHUB_WORKSPACE/wheelhouse/pytket-*.whl |
| 291 | + - name: Run tests |
| 292 | + run: | |
| 293 | + cd tket/pytket/tests |
| 294 | + pip install -r requirements.txt |
| 295 | + pytest --ignore=simulator/ |
| 296 | +
|
220 | 297 | test_macos_arm64_wheels: |
221 | 298 | name: Test macos arm64 wheels |
222 | 299 | needs: build_macos_arm64_wheels |
@@ -294,7 +371,7 @@ jobs: |
294 | 371 | publish_to_pypi: |
295 | 372 | name: Publish to pypi |
296 | 373 | if: github.event_name == 'release' |
297 | | - needs: [test_linux_wheels, test_linux_aarch64_wheels, test_macos_arm64_wheels, test_Windows_wheels] |
| 374 | + needs: [test_linux_wheels, test_linux_aarch64_wheels, test_macos_x86_wheels, test_macos_arm64_wheels, test_Windows_wheels] |
298 | 375 | runs-on: ubuntu-latest |
299 | 376 | environment: |
300 | 377 | name: release |
|
0 commit comments