From fc6b5adeb90d350869a1cdd07fa99643380a3e7f Mon Sep 17 00:00:00 2001
From: Andrei Litvin <andy314@gmail.com>
Date: Wed, 24 Apr 2024 12:08:37 -0400
Subject: [PATCH 1/2] Fix builds to macos-13 rather than latest due to
 bootstrap python incompatibilities (#33142)

---
 .github/workflows/build.yaml         | 2 +-
 .github/workflows/fuzzing-build.yaml | 2 +-
 .github/workflows/tests.yaml         | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1da7dd09665706..15426214f49ad0 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -369,7 +369,7 @@ jobs:
 
     build_darwin:
         name: Build on Darwin (clang, python_lib, simulated)
-        runs-on: macos-latest
+        runs-on: macos-13
         if: github.actor != 'restyled-io[bot]'
 
         steps:
diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml
index f354ce369c27fd..c688a6023f13bf 100644
--- a/.github/workflows/fuzzing-build.yaml
+++ b/.github/workflows/fuzzing-build.yaml
@@ -68,7 +68,7 @@ jobs:
 
     build_darwin_fuzzing:
         name: Build on Darwin
-        runs-on: macos-latest
+        runs-on: macos-13
         if: github.actor != 'restyled-io[bot]'
 
         steps:
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 2907a4a89711ea..5f6ca951648dac 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -328,7 +328,7 @@ jobs:
             LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
 
         if: github.actor != 'restyled-io[bot]'
-        runs-on: macos-latest
+        runs-on: macos-13
 
         steps:
             - name: Checkout
@@ -584,7 +584,7 @@ jobs:
             TSAN_OPTIONS: "halt_on_error=1"
 
         if: github.actor != 'restyled-io[bot]' && false
-        runs-on: macos-latest
+        runs-on: macos-13
 
         steps:
             - name: Checkout

From 219a02087db81005a28b2d17365712f005f48dcb Mon Sep 17 00:00:00 2001
From: Andrei Litvin <andy314@gmail.com>
Date: Thu, 25 Apr 2024 11:34:53 -0400
Subject: [PATCH 2/2] Add a few more conversions that did not happen in ToT but
 seem needed on 1.3

---
 .github/workflows/darwin-tests.yaml | 2 +-
 .github/workflows/darwin.yaml       | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml
index e6e14ec4929a11..56fd5856428e10 100644
--- a/.github/workflows/darwin-tests.yaml
+++ b/.github/workflows/darwin-tests.yaml
@@ -49,7 +49,7 @@ jobs:
             LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
 
         if: github.actor != 'restyled-io[bot]'
-        runs-on: macos-latest
+        runs-on: macos-13
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml
index 1555032827dd28..c907318af10e07 100644
--- a/.github/workflows/darwin.yaml
+++ b/.github/workflows/darwin.yaml
@@ -31,7 +31,7 @@ jobs:
     framework:
         name: Build framework
         if: github.actor != 'restyled-io[bot]'
-        runs-on: macos-latest
+        runs-on: macos-13
         strategy:
             matrix:
                 options: # We don't need a full matrix
@@ -68,7 +68,7 @@ jobs:
     tests:
         name: Run framework tests
         if: github.actor != 'restyled-io[bot]'
-        runs-on: macos-latest
+        runs-on: macos-13
         strategy:
             matrix:
                 options: # We don't need a full matrix
@@ -131,7 +131,7 @@ jobs:
     tv-casting-bridge:
         name: Build TV Casting Bridge example
         if: github.actor != 'restyled-io[bot]'
-        runs-on: macos-latest
+        runs-on: macos-13
         steps:
             - name: Checkout
               uses: actions/checkout@v4
@@ -148,7 +148,7 @@ jobs:
     darwin:
         name: Build Darwin # Matches the previous monolithic build that's marked "required" for PRs
         needs: [ framework, tests ]
-        runs-on: macos-latest
+        runs-on: macos-13
         steps:
             - name: Done
               run: 'true' # nothing to do