diff --git a/.github/actions/prepare_environment/action.yml b/.github/actions/prepare_environment/action.yml index 358070bd..3aea9322 100644 --- a/.github/actions/prepare_environment/action.yml +++ b/.github/actions/prepare_environment/action.yml @@ -96,7 +96,14 @@ runs: # Try to install warp-channel-config but don't complain if it cannot # be installed. ./script/install_channel_config || true - if ${{ inputs.install_release_deps == 'true' }}; then + if ${{ inputs.install_test_deps == 'true' }}; then + # Test deps include cargo-nextest (the test harness CI uses). + # The linux branch below already handles this; macOS used + # to fall through to install_cargo_build_deps, which doesn't + # install nextest -- so `cargo nextest run` blew up later + # with "no such command: nextest". + ./script/install_cargo_test_deps + elif ${{ inputs.install_release_deps == 'true' }}; then ./script/install_cargo_release_deps else ./script/install_cargo_build_deps diff --git a/script/macos/install_build_deps b/script/macos/install_build_deps index 1a264643..b06668c9 100755 --- a/script/macos/install_build_deps +++ b/script/macos/install_build_deps @@ -2,4 +2,20 @@ # # Installs macOS-specific build dependencies required to build Warp. -xcodebuild -downloadComponent MetalToolchain +# `xcodebuild -downloadComponent` was added in Xcode 15.3. On stock +# GitHub `macos-latest` runners, this script executes *before* +# `prepare_environment` runs `setup-xcode` to select Xcode 26, so the +# active Xcode is still whatever ships with the runner image, which +# may not support the option. CI's `prepare_environment` action has a +# dedicated `Install selected Xcode Metal toolchain` step that retries +# this exact command after `setup-xcode`, so silently skipping here is +# safe for stock CI. Self-hosted runners hit this script with their +# own Xcode pre-selected and the call should succeed there. +if out=$(xcodebuild -downloadComponent MetalToolchain 2>&1); then + printf '%s\n' "$out" +elif printf '%s' "$out" | grep -q "invalid option '-downloadComponent'"; then + echo "xcodebuild -downloadComponent unsupported by current Xcode; skipping (CI retries after setup-xcode)." +else + printf '%s\n' "$out" >&2 + exit 1 +fi