Skip to content

Commit cb413b5

Browse files
committed
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 <alex.daubois@gmail.com> Co-authored by Arnaud Le Blanc <arnaud.lb@gmail.com> Co-authored by Jakub Zelenka <bukka@php.net> Closes GH-20669
1 parent 2b04e08 commit cb413b5

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Update clang
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
softwareupdate -l
8+
label=$((softwareupdate -l 2>/dev/null | grep 'Label:' | grep -o 'Command Line Tools for Xcode.*' | head -1) || echo '')
9+
if [ -n "$label" ]; then
10+
softwareupdate -i "$label"
11+
xcode_path=$(ls -1 '/Applications' | grep 'Xcode_.*\.app' | head -1)
12+
sudo xcode-select -s "/Applications/$xcode_path"
13+
else
14+
echo "Not found."
15+
fi
16+
which clang
17+
clang -v

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ jobs:
367367
uses: actions/checkout@v5
368368
with:
369369
ref: ${{ inputs.branch }}
370+
- name: Update clang
371+
uses: ./.github/actions/macos-update-clang
370372
- name: brew
371373
uses: ./.github/actions/brew
372374
- name: ./configure

.github/workflows/push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ jobs:
117117
steps:
118118
- name: git checkout
119119
uses: actions/checkout@v5
120+
- name: Update clang
121+
uses: ./.github/actions/macos-update-clang
120122
- name: brew
121123
uses: ./.github/actions/brew
122124
- name: ccache

0 commit comments

Comments
 (0)