Skip to content

Commit

Permalink
Switch to macos-14 GitHub Actions runner (#868)
Browse files Browse the repository at this point in the history
With this commit macOS GitHub Actions start running on 'macos-14'
runner, which now runs on Apple silicon.

One observable change is that 'Mozc_arm64.pkg' from 'build_arm64' job
is a bit smaller because we no longer need to build Qt6 as universal
binaries.

Python version is also updated as Python 3.9 is not available for
'macos-14' runner right now.

Closes #868.

PiperOrigin-RevId: 603665115
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Feb 2, 2024
1 parent 1ce8fe9 commit 4af1a44
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ concurrency:

jobs:
build_arm64:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
runs-on: macos-11
timeout-minutes: 90
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
runs-on: macos-14
timeout-minutes: 60

steps:
- name: checkout
Expand All @@ -27,7 +27,8 @@ jobs:
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.9'
# TODO: Switch back to '3.9' after https://github.com/actions/setup-python/issues/808
python-version: '3.10'

- name: Install pip dependencies
working-directory: ./src
Expand All @@ -48,10 +49,8 @@ jobs:
- name: Build Qt
working-directory: ./src
# We haven't succeeded to cross build Qt6 for arm64 on intel mac.
# Build a Universal macOS Binary for Qt6 as a workaround.
run: |
python3 build_tools/build_qt.py --release --confirm_license --macos_cpus=x86_64,arm64
python3 build_tools/build_qt.py --release --confirm_license --macos_cpus=arm64
echo "MOZC_QT_PATH=${PWD}/third_party/qt" >> $GITHUB_ENV
- name: bazel build
Expand All @@ -67,9 +66,9 @@ jobs:
if-no-files-found: warn

build_intel64:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
runs-on: macos-11
timeout-minutes: 90
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
runs-on: macos-14
timeout-minutes: 60

steps:
- name: checkout
Expand All @@ -81,7 +80,8 @@ jobs:
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.9'
# TODO: Switch back to '3.9' after https://github.com/actions/setup-python/issues/808
python-version: '3.10'

- name: Install pip dependencies
working-directory: ./src
Expand Down Expand Up @@ -119,9 +119,9 @@ jobs:
if-no-files-found: warn

build_universal_binary:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
runs-on: macos-11
timeout-minutes: 120
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
runs-on: macos-14
timeout-minutes: 90

steps:
- name: checkout
Expand All @@ -133,7 +133,8 @@ jobs:
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.9'
# TODO: Switch back to '3.9' after https://github.com/actions/setup-python/issues/808
python-version: '3.10'

- name: Install pip dependencies
working-directory: ./src
Expand Down Expand Up @@ -171,9 +172,9 @@ jobs:
if-no-files-found: warn

test:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
runs-on: macos-11
timeout-minutes: 90
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
runs-on: macos-14
timeout-minutes: 60

steps:
- name: checkout
Expand All @@ -185,7 +186,8 @@ jobs:
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.9'
# TODO: Switch back to '3.9' after https://github.com/actions/setup-python/issues/808
python-version: '3.10'

- name: Install pip dependencies
working-directory: ./src
Expand Down Expand Up @@ -219,8 +221,8 @@ jobs:
# in other jobs. Another approach would be to use "needs:".
# https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow
cache_deps:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
runs-on: macos-11
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
runs-on: macos-14
timeout-minutes: 15

steps:
Expand All @@ -230,7 +232,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
# TODO: Switch back to '3.9' after https://github.com/actions/setup-python/issues/808
python-version: '3.10'

- name: Install pip dependencies
working-directory: ./src
Expand Down

0 comments on commit 4af1a44

Please sign in to comment.