@@ -34,41 +34,30 @@ jobs:
3434 HOMEBREW_NO_AUTO_UPDATE : " 1" # avoid updating taps during install
3535 HOMEBREW_NO_ANALYTICS : " 1"
3636 HOMEBREW_CURL_RETRIES : " 6" # ask curl inside brew to retry
37+ HOMEBREW_NO_INSTALL_CLEANUP : " 1"
3738
3839 steps :
3940 - name : Checkout (with submodules)
4041 uses : actions/checkout@v4
4142 with :
4243 submodules : true
4344
44- - name : Cache Homebrew bottles # downloads (so retries don't redownload)
45- uses : actions/cache@v4
46- with :
47- path : |
48- ~/Library/Caches/Homebrew
49- /Users/runner/Library/Caches/Homebrew
50- key : homebrew-${{ runner.os }}-mac14-cmake-gcc-newlib
51- restore-keys : |
52- homebrew-${{ runner.os }}-
53-
5445 - name : Install toolchain and build tools
5546 run : |
56- # Install with step throttle to hopefully avoid stuck jobs
57-
5847 set -euxo pipefail
5948
60- throttle_delay=5
61- brew update
62-
63- sleep "$throttle_delay"
64- brew install --force-bottle cmake
49+ # Keep Homebrew pinned on the runner; only install what we need.
50+ brew list cmake >/dev/null 2>&1 || brew install --force-bottle cmake
51+ brew list ninja >/dev/null 2>&1 || brew install --force-bottle ninja
6552
66- sleep "$throttle_delay"
67- brew install --force-bottle ninja
53+ # Install ARM GNU Toolchain directly (avoid changing Homebrew state)
54+ ARM_GCC_URL="https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-darwin-arm64-arm-none-eabi.pkg"
55+ ARM_GCC_SHA="59b17db759b3a479b8ef7358e454e0b72b1162f6e9effa2ba3a10aa4414b1557"
56+ ARM_GCC_PKG="arm-gnu-toolchain-14.3.rel1-darwin-arm64-arm-none-eabi.pkg"
6857
69- # Use cask to include headers such as <stdlib.h>
70- sleep "$throttle_delay"
71- brew install --cask gcc-arm-embedded
58+ curl -L --retry 3 --retry-delay 5 -o "$ARM_GCC_PKG" "$ARM_GCC_URL"
59+ echo "${ARM_GCC_SHA} ${ARM_GCC_PKG}" | shasum -a 256 --check
60+ sudo installer -pkg "$ARM_GCC_PKG" -target /
7261
7362 - name : Probe ARM GCC (paths + smoke build)
7463 run : |
0 commit comments