From ea82c94efa857f69e42929da54e4456ac92e8831 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 4 Dec 2025 14:31:29 +0100 Subject: [PATCH 1/2] Update clang in macOS build This resolves a crash in release builds. This may be dropped again in the future once the bugfix lands. Co-authored by Alexandre Daubois Co-authored by Arnaud Le Blanc Co-authored by Jakub Zelenka --- .github/actions/macos-update-clang/action.yml | 17 +++++++++++++++++ .github/workflows/nightly.yml | 2 ++ .github/workflows/push.yml | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 .github/actions/macos-update-clang/action.yml diff --git a/.github/actions/macos-update-clang/action.yml b/.github/actions/macos-update-clang/action.yml new file mode 100644 index 0000000000000..d93fddb841652 --- /dev/null +++ b/.github/actions/macos-update-clang/action.yml @@ -0,0 +1,17 @@ +name: Update clang +runs: + using: composite + steps: + - shell: bash + run: | + softwareupdate -l + label=$(softwareupdate -l 2>/dev/null | grep 'Label:' | grep -o 'Command Line Tools for Xcode.*' | head -1) + if [ -n "$label" ]; then + softwareupdate -i "$label" + xcode_path=$(ls -1 '/Applications' | grep 'Xcode_.*\.app' | head -1) + sudo xcode-select -s "/Applications/$xcode_path" + else + echo "Not found." + fi + which clang + clang -v diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 909a412e796e6..e67deb8ffe4ff 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -367,6 +367,8 @@ jobs: uses: actions/checkout@v5 with: ref: ${{ inputs.branch }} + - name: Update clang + uses: ./.github/actions/macos-update-clang - name: brew uses: ./.github/actions/brew - name: ./configure diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 028255330d1fc..054f4a15286d2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -117,6 +117,8 @@ jobs: steps: - name: git checkout uses: actions/checkout@v5 + - name: Update clang + uses: ./.github/actions/macos-update-clang - name: brew uses: ./.github/actions/brew - name: ccache From 1b99f21c6ae51880d36ab656e151b7030de1a606 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 8 Dec 2025 17:52:26 +0100 Subject: [PATCH 2/2] Testing --- .github/actions/macos-update-clang/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/macos-update-clang/action.yml b/.github/actions/macos-update-clang/action.yml index d93fddb841652..f1cc51dbf5f5a 100644 --- a/.github/actions/macos-update-clang/action.yml +++ b/.github/actions/macos-update-clang/action.yml @@ -4,8 +4,9 @@ runs: steps: - shell: bash run: | + set -x softwareupdate -l - label=$(softwareupdate -l 2>/dev/null | grep 'Label:' | grep -o 'Command Line Tools for Xcode.*' | head -1) + label=$((softwareupdate -l 2>/dev/null | grep 'Label:' | grep -o 'Command Line Tools for Xcode.*' | head -1) || echo '') if [ -n "$label" ]; then softwareupdate -i "$label" xcode_path=$(ls -1 '/Applications' | grep 'Xcode_.*\.app' | head -1)