Skip to content

Commit

Permalink
Test and release on newer macOS: 13 (x86-64) and 14 (arm64) (#21655)
Browse files Browse the repository at this point in the history
This follows-up on the deprecation of support for older macOS versions
that happened in 2.24.x and earlier, by switching `main` (2.25.x) to be
building on macOS 13 for x86-64 (upgrading from 10.15) and macOS 14 for
arm64 (upgrading from 11). These particular versions are dictated by
Github's hosted runners: there's no arm64 macos-13 runners.

| version | branch | supported (x86-64) | built-on (x86-64)   | supported (arm64) | built-on (arm64) | refs                                        |        |
|---------|--------|--------------------|---------------------|-------------------|------------------|---------------------------------------------|--------|
| 2.22.x  | 2.22.x | 10.15              | 10.15 (self-hosted) | 11                | 11 (self)        | #21074                                      | #21326 |
| 2.23.x  | 2.23.x | 12                 | 10.15 (self)        | 12                | 11 (self)        | #21569 (also #21417 but reverted in #21623) |        |
| 2.24.x  | 2.24.x | 13                 | 10.15 (self)        | 14                | 11 (self)        | #21333, #21623                              |        |
| 2.25.x  | main   | 13                 | 13 (Github hosted)  | 14                | 14 (GH)          | #21333, #21413, this PR                     |        |

This is _preparation_ for scaling down our self-hosted macOS runners,
but we cannot do that yet. They're still used by:

- 2.24.x branches and earlier (in this repo)
- scie-pants' CI (pantsbuild/scie-pants#421)

Thus, we at least need to wait a few months for the 2.24.x milestone to
be closed before we can reduce that spend.

(NB. despite the title, this doesn't _start_ testing on arm64 macOS: see
separate issue #20993.)

Fixes #21413
Fixes #21333
  • Loading branch information
huonw authored Nov 18, 2024
1 parent 61b79fc commit 691d396
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 116 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/clear_self_hosted_persistent_caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,6 @@ jobs:
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
clean_macos10_15_x86_64:
runs-on:
- self-hosted
- macOS-10.15-X64
steps:
- name: df before
run: df -h
- name: Deleting ~/Library/Caches
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true
- name: Deleting ~/.cache
run: du -sh ~/.cache || true; rm -rf ~/.cache || true
- name: Deleting ~/.nce
run: du -sh ~/.nce || true; rm -rf ~/.nce || true
- name: Deleting ~/.rustup
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true
- name: Deleting ~/.pex
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
clean_macos11_arm64:
runs-on:
- self-hosted
- macOS-11-ARM64
steps:
- name: df before
run: df -h
- name: Deleting ~/Library/Caches
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true
- name: Deleting ~/.cache
run: du -sh ~/.cache || true; rm -rf ~/.cache || true
- name: Deleting ~/.nce
run: du -sh ~/.nce || true; rm -rf ~/.nce || true
- name: Deleting ~/.rustup
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true
- name: Deleting ~/.pex
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
name: Clear persistent caches on long-lived self-hosted runners
'on':
workflow_dispatch: {}
54 changes: 40 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,39 @@ jobs:
\ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)\"\
\ \\\n --data-binary \"@$WHL\";\n"
timeout-minutes: 90
build_wheels_macos10_15_x86_64:
build_wheels_macos13_x86_64:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: false
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (macOS10-15-x86_64)
name: Build wheels (macOS13-x86_64)
needs:
- release_info
runs-on:
- self-hosted
- macOS-10.15-X64
- macos-13
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Set up Python 3.7, 3.8, 3.9, 3.10, 3.12, 3.13, 3.11
uses: actions/setup-python@v5
with:
python-version: '3.7
3.8
3.9
3.10
3.12
3.13
3.11'
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
Expand All @@ -211,7 +226,7 @@ jobs:
- name: Cache Rust toolchain
uses: actions/cache@v4
with:
key: macOS10-15-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain')
key: macOS13-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain')
}}-v2
path: '~/.rustup/toolchains/1.82.0-*
Expand Down Expand Up @@ -248,7 +263,7 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-macOS10-15-x86_64
name: logs-wheels-and-pex-macOS13-x86_64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
Expand All @@ -269,24 +284,35 @@ jobs:
\ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)\"\
\ \\\n --data-binary \"@$WHL\";\n"
timeout-minutes: 90
build_wheels_macos11_arm64:
build_wheels_macos14_arm64:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: false
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (macOS11-ARM64)
name: Build wheels (macOS14-ARM64)
needs:
- release_info
runs-on:
- self-hosted
- macOS-11-ARM64
- macos-14
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Set up Python 3.9, 3.10, 3.12, 3.13, 3.11
uses: actions/setup-python@v5
with:
python-version: '3.9
3.10
3.12
3.13
3.11'
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
Expand All @@ -297,7 +323,7 @@ jobs:
- name: Cache Rust toolchain
uses: actions/cache@v4
with:
key: macOS11-ARM64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain')
key: macOS14-ARM64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain')
}}-v2
path: '~/.rustup/toolchains/1.82.0-*
Expand Down Expand Up @@ -334,7 +360,7 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-macOS11-ARM64
name: logs-wheels-and-pex-macOS14-ARM64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
Expand Down Expand Up @@ -363,8 +389,8 @@ jobs:
needs:
- build_wheels_linux_x86_64
- build_wheels_linux_arm64
- build_wheels_macos10_15_x86_64
- build_wheels_macos11_arm64
- build_wheels_macos13_x86_64
- build_wheels_macos14_arm64
- release_info
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit 691d396

Please sign in to comment.