Skip to content

Commit

Permalink
Use macos-14 runner to build MacOS arm64 wheels (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec authored Apr 15, 2024
1 parent 73c601d commit 1d1ca6d
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-with-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build_and_test:
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-14']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true'
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-12', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-12', 'macos-14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true' || needs.check_changes.outputs.pytket_or_workflow_changed == 'true'
strategy:
matrix:
os: ['macos-12', 'macos-13-xlarge']
os: ['macos-12', 'macos-14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -401,7 +401,7 @@ jobs:
python -m pip install -r requirements.txt
python -m pytest --ignore=simulator/
- name: Check type stubs are up-to-date and run mypy
if: matrix.os == 'macos-13-xlarge' && (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
if: matrix.os == 'macos-14' && (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
run: |
python -m pip install -U mypy pybind11-stubgen
cd pytket
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
if: ${{ needs.changes.outputs.libs != '[]' && needs.changes.outputs.libs != '' }}
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-14']
lib: ${{ fromJson(needs.changes.outputs.libs) }}
build_type: ['Release', 'Debug']
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Build
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-14']
runs-on: ${{ matrix.os }}
steps:

Expand Down
39 changes: 20 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
name: Linux_aarch64_3.${{ matrix.python3-version }}_wheel
path: wheelhouse/

build_macos_wheels:
name: Build macos wheels
build_macos_x86_wheels:
name: Build macos x86 wheels
runs-on: macos-12
strategy:
matrix:
Expand Down Expand Up @@ -101,12 +101,12 @@ jobs:
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl"
- uses: actions/upload-artifact@v4
with:
name: MacOS_${{ matrix.python-version }}_wheel
name: MacOS_x86_${{ matrix.python-version }}_wheel
path: wheelhouse/

build_macos_M1_wheels:
name: Build macos (M1) wheels
runs-on: macos-13-xlarge
build_macos_arm64_wheels:
name: Build macos arm64 wheels
runs-on: macos-14
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
Expand All @@ -125,7 +125,7 @@ jobs:
run: |
conan profile detect
DEFAULT_PROFILE_PATH=`conan profile path default`
PROFILE_PATH=./conan-profiles/macos-13-xlarge
PROFILE_PATH=./conan-profiles/macos-14
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH}
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0
Expand All @@ -139,12 +139,12 @@ jobs:
# Ensure wheels are compatible with MacOS 12.0 and later:
export WHEEL_PLAT_NAME=macosx_12_0_arm64
python${{ matrix.python-version }} -m pip install -U pip build
python${{ matrix.python-version }} -m pip install delocate ~= 0.10.7
python${{ matrix.python-version }} -m pip install delocate~=0.10.7
python${{ matrix.python-version }} -m build
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl"
- uses: actions/upload-artifact@v4
with:
name: MacOS_M1_${{ matrix.python-version }}_wheel
name: MacOS_arm64_${{ matrix.python-version }}_wheel
path: wheelhouse/

build_Windows_wheels:
Expand Down Expand Up @@ -253,9 +253,9 @@ jobs:
- name: Run tests
run: cd tket/pytket/tests && pytest --ignore=simulator/

test_macos_wheels:
name: Test macos wheels
needs: build_macos_wheels
test_macos_x86_wheels:
name: Test macos x86 wheels
needs: build_macos_x86_wheels
strategy:
matrix:
os: ['macos-12', 'macos-13']
Expand All @@ -269,7 +269,7 @@ jobs:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: MacOS_${{ matrix.python-version }}_wheel
name: MacOS_x86_${{ matrix.python-version }}_wheel
path: wheelhouse/
- uses: actions/checkout@v4
with:
Expand All @@ -283,13 +283,14 @@ jobs:
pip install -r requirements.txt
pytest --ignore=simulator/
test_macos_M1_wheels:
name: Test macos (M1) wheels
needs: build_macos_M1_wheels
runs-on: macos-13-xlarge
test_macos_arm64_wheels:
name: Test macos arm64 wheels
needs: build_macos_arm64_wheels
strategy:
matrix:
os: ['macos-13-xlarge', 'macos-14']
python-version: ['3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -298,7 +299,7 @@ jobs:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: MacOS_M1_${{ matrix.python-version }}_wheel
name: MacOS_arm64_${{ matrix.python-version }}_wheel
path: wheelhouse/
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -345,7 +346,7 @@ jobs:
publish_to_pypi:
name: Publish to pypi
if: github.event_name == 'release'
needs: [test_linux_wheels, test_linux_aarch64_wheels, test_macos_wheels, test_macos_M1_wheels, test_Windows_wheels]
needs: [test_linux_wheels, test_linux_aarch64_wheels, test_macos_x86_wheels, test_macos_arm64_wheels, test_Windows_wheels]
runs-on: ubuntu-22.04
steps:
- name: Download all wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-14']
lib: ${{ fromJson(needs.set_libs_matrix.outputs.libs) }}
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_libs_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: test library
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-13-xlarge']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-14']
lib: ['tklog', 'tkassert', 'tkrng', 'tktokenswap', 'tkwsm']
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion conan-profiles/macos-13-xlarge → conan-profiles/macos-14
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=14
compiler.version=15
os=Macos
8 changes: 0 additions & 8 deletions conan-profiles/macos-armv8-clang14

This file was deleted.

2 changes: 1 addition & 1 deletion pytket/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def package(self):
cmake.install()

def requirements(self):
self.requires("tket/1.2.116@tket/stable")
self.requires("tket/1.2.117@tket/stable")
self.requires("tklog/0.3.3@tket/stable")
self.requires("tkrng/0.3.3@tket/stable")
self.requires("tkassert/0.3.4@tket/stable")
Expand Down
2 changes: 1 addition & 1 deletion tket/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class TketConan(ConanFile):
name = "tket"
version = "1.2.116"
version = "1.2.117"
package_type = "library"
license = "Apache 2"
homepage = "https://github.com/CQCL/tket"
Expand Down

0 comments on commit 1d1ca6d

Please sign in to comment.