Skip to content

Commit 5080caa

Browse files
authored
Explicitly configure Xcode to use in GH Actions (#2197)
This prevents surprising build breaks caused by changing defaults. xcode-select and the setup-xcode-version Action have no effect on OpenJDK's configure. Triggered by GitHub changing the default Xcode to 12 on Oct 20: actions/runner-images#1712
1 parent 96e2c91 commit 5080caa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ jobs:
5353
- name: Build macOS
5454
run: |
5555
export JAVA_HOME=$JAVA_HOME_11_X64
56+
57+
# Configure Xcode version explicitly. Default versions may change any time.
58+
# Available versions: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode
59+
case "${{ matrix.version }}" in
60+
"jdk8u"|"jdk11u"|"jdk15u")
61+
export DEVELOPER_DIR="/Applications/Xcode_11.7.app/Contents/Developer"
62+
;;
63+
"jdk")
64+
export DEVELOPER_DIR="/Applications/Xcode_12.1.app/Contents/Developer"
65+
;;
66+
*)
67+
echo "Unknown JDK version: ${{ matrix.version }}" >&2
68+
exit 1
69+
;;
70+
esac
71+
5672
# Skip freetype build on jdk11+
5773
if [ ${{ matrix.version }} != "jdk8u" ]; then
5874
export BUILD_ARGS="--skip-freetype"

0 commit comments

Comments
 (0)