From 4af1a445bba5b7e5ce610a0eb5ada23b6807ac1a Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 2 Feb 2024 13:57:39 +0000 Subject: [PATCH] Switch to `macos-14` GitHub Actions runner (#868) 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 --- .github/workflows/macos.yaml | 47 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 45679ecf7..5905d2fc3 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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