Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macos-10.15 brownout. #16317

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ jobs:
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Bootstrap Pants, test Rust (macOS10-x86_64)
name: Bootstrap Pants, test Rust (macOS11-x86_64)
runs-on:
- macos-10.15
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS10-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
key: macOS11-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
path: '~/.rustup/toolchains/1.62.1-*

~/.rustup/update-hashes
Expand All @@ -206,7 +206,7 @@ jobs:
- name: Cache Cargo
uses: actions/cache@v3
with:
key: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
key: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
}-v1

'
Expand All @@ -215,7 +215,7 @@ jobs:
~/.cargo/git

'
restore-keys: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-
restore-keys: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-

'
- id: get-engine-hash
Expand All @@ -227,7 +227,7 @@ jobs:
- name: Cache native engine
uses: actions/cache@v3
with:
key: 'macOS10-x86_64-engine-${ steps.get-engine-hash.outputs.hash }-v1
key: 'macOS11-x86_64-engine-${ steps.get-engine-hash.outputs.hash }-v1

'
path: '.pants
Expand Down Expand Up @@ -261,12 +261,12 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-bootstrap-macOS10-x86_64
name: pants-log-bootstrap-macOS11-x86_64
path: .pants.d/pants.log
- name: Upload native binaries
uses: actions/upload-artifact@v3
with:
name: native_binaries.${ matrix.python-version }.macOS10-x86_64
name: native_binaries.${ matrix.python-version }.macOS11-x86_64
path: '.pants

src/python/pants/engine/internals/native_engine.so
Expand Down Expand Up @@ -777,10 +777,10 @@ jobs:
env:
ARCHFLAGS: -arch x86_64
if: github.repository_owner == 'pantsbuild'
name: Test Python (macOS10-x86_64)
name: Test Python (macOS11-x86_64)
needs: bootstrap_pants_macos_x86_64
runs-on:
- macos-10.15
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -825,7 +825,7 @@ jobs:
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${ matrix.python-version }.macOS10-x86_64
name: native_binaries.${ matrix.python-version }.macOS11-x86_64
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
Expand All @@ -838,7 +838,7 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-macOS10-x86_64
name: pants-log-python-test-macOS11-x86_64
path: .pants.d/pants.log
strategy:
matrix:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
if: (github.repository_owner == 'pantsbuild') && (needs.docs_only_check.outputs.docs_only
!= 'DOCS_ONLY')
name: Bootstrap Pants, test Rust (macOS10-x86_64)
name: Bootstrap Pants, test Rust (macOS11-x86_64)
needs:
- check_labels
- docs_only_check
runs-on:
- macos-10.15
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS10-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
key: macOS11-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
path: '~/.rustup/toolchains/1.62.1-*

~/.rustup/update-hashes
Expand All @@ -213,7 +213,7 @@ jobs:
- name: Cache Cargo
uses: actions/cache@v3
with:
key: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
key: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
}-v1

'
Expand All @@ -222,7 +222,7 @@ jobs:
~/.cargo/git

'
restore-keys: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-
restore-keys: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-

'
- id: get-engine-hash
Expand All @@ -234,7 +234,7 @@ jobs:
- name: Cache native engine
uses: actions/cache@v3
with:
key: 'macOS10-x86_64-engine-${ steps.get-engine-hash.outputs.hash }-v1
key: 'macOS11-x86_64-engine-${ steps.get-engine-hash.outputs.hash }-v1

'
path: '.pants
Expand Down Expand Up @@ -268,12 +268,12 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-bootstrap-macOS10-x86_64
name: pants-log-bootstrap-macOS11-x86_64
path: .pants.d/pants.log
- name: Upload native binaries
uses: actions/upload-artifact@v3
with:
name: native_binaries.${ matrix.python-version }.macOS10-x86_64
name: native_binaries.${ matrix.python-version }.macOS11-x86_64
path: '.pants

src/python/pants/engine/internals/native_engine.so
Expand Down Expand Up @@ -525,12 +525,12 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
if: (github.repository_owner == 'pantsbuild') && (needs.docs_only_check.outputs.docs_only
!= 'DOCS_ONLY')
name: Build wheels and fs_util (macOS10-x86_64)
name: Build wheels and fs_util (macOS11-x86_64)
needs:
- check_labels
- docs_only_check
runs-on:
- macos-10.15
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -564,7 +564,7 @@ jobs:
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
key: macOS10-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
key: macOS11-x86_64-rustup-${ hashFiles('rust-toolchain') }-v1
path: '~/.rustup/toolchains/1.62.1-*

~/.rustup/update-hashes
Expand All @@ -575,7 +575,7 @@ jobs:
- name: Cache Cargo
uses: actions/cache@v3
with:
key: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
key: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-${ hashFiles(''src/rust/engine/Cargo.*'')
}-v1

'
Expand All @@ -584,7 +584,7 @@ jobs:
~/.cargo/git

'
restore-keys: 'macOS10-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-
restore-keys: 'macOS11-x86_64-cargo-${ hashFiles(''rust-toolchain'') }-

'
- env:
Expand Down Expand Up @@ -614,7 +614,7 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-wheels-macOS10-x86_64
name: pants-log-wheels-macOS11-x86_64
path: .pants.d/pants.log
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -1063,13 +1063,13 @@ jobs:
ARCHFLAGS: -arch x86_64
if: (github.repository_owner == 'pantsbuild') && (needs.docs_only_check.outputs.docs_only
!= 'DOCS_ONLY')
name: Test Python (macOS10-x86_64)
name: Test Python (macOS11-x86_64)
needs:
- bootstrap_pants_macos_x86_64
- check_labels
- docs_only_check
runs-on:
- macos-10.15
- macos-11
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -1114,7 +1114,7 @@ jobs:
- name: Download native binaries
uses: actions/download-artifact@v3
with:
name: native_binaries.${ matrix.python-version }.macOS10-x86_64
name: native_binaries.${ matrix.python-version }.macOS11-x86_64
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
Expand All @@ -1127,7 +1127,7 @@ jobs:
name: Upload pants.log
uses: actions/upload-artifact@v3
with:
name: pants-log-python-test-macOS10-x86_64
name: pants-log-python-test-macOS11-x86_64
path: .pants.d/pants.log
strategy:
matrix:
Expand Down
10 changes: 5 additions & 5 deletions build-support/bin/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class Platform(Enum):
LINUX_X86_64 = "Linux-x86_64"
MACOS10_X86_64 = "macOS10-x86_64"
MACOS11_X86_64 = "macOS11-x86_64"
MACOS11_ARM64 = "macOS11-ARM64"


Expand Down Expand Up @@ -333,8 +333,8 @@ def platform_name(self) -> str:
return str(self.platform.value)

def runs_on(self) -> list[str]:
if self.platform == Platform.MACOS10_X86_64:
return ["macos-10.15"]
if self.platform == Platform.MACOS11_X86_64:
return ["macos-11"]
if self.platform == Platform.MACOS11_ARM64:
return ["self-hosted", "macOS11", "ARM64"]
if self.platform == Platform.LINUX_X86_64:
Expand All @@ -343,7 +343,7 @@ def runs_on(self) -> list[str]:

def platform_env(self):
ret = {}
if self.platform == Platform.MACOS10_X86_64:
if self.platform == Platform.MACOS11_X86_64:
# Works around bad `-arch arm64` flag embedded in Xcode 12.x Python interpreters on
# intel machines. See: https://github.com/giampaolo/psutil/issues/1832
ret["ARCHFLAGS"] = "-arch x86_64"
Expand Down Expand Up @@ -594,7 +594,7 @@ def test_python_linux(shard: str) -> dict[str, Any]:


def macos_x86_64_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
helper = Helper(Platform.MACOS10_X86_64)
helper = Helper(Platform.MACOS11_X86_64)
jobs = {
"bootstrap_pants_macos_x86_64": {
"name": f"Bootstrap Pants, test Rust ({helper.platform_name()})",
Expand Down