Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin JDK11 x64 build to XCode rather than commandline tools #3541

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ jobs:

build_macos:
name: macOS
runs-on: macos-11
runs-on: ${{ matrix.version.distro }}
strategy:
fail-fast: false
matrix:
os: [macOS]
version: [jdk8u, jdk11u]
version: [
{ name: jdk8u, distro: macos-11 },
{ name: jdk11u, distro: macos-13 },
]
variant: [temurin]

steps:
Expand All @@ -129,19 +132,25 @@ jobs:
with:
java-version: 7
distribution: 'zulu'
if: matrix.version == 'jdk8u'
if: matrix.version.name == 'jdk8u'

- name: Select correct Xcode
- name: Select correct Xcode (JDK8)
if: matrix.version.name == 'jdk8u'
run: |
rm -rf /Applications/Xcode.app
ln -s /Applications/Xcode_11.7.app /Applications/Xcode.app
ln -s /Applications/Xcode_11.7.app /Applications/Xcode-11.7.app

- name: Select correct Xcode (JDK11+)
if: matrix.version.name != 'jdk8u'
run: |
rm -rf /Applications/Xcode.app
ln -s /Applications/Xcode_15.0.1.app /Applications/Xcode.app

- name: Build macOS
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
# Skip freetype build on jdk11+
if [ ${{ matrix.version }} != "jdk8u" ]; then
if [ ${{ matrix.version.name }} != "jdk8u" ]; then
export BUILD_ARGS="--skip-freetype --make-exploded-image --create-sbom"
./build-farm/make-adopt-build-farm.sh
export BUILD_ARGS="--assemble-exploded-image --create-sbom"
Expand All @@ -151,7 +160,7 @@ jobs:
./build-farm/make-adopt-build-farm.sh
fi
env:
JAVA_TO_BUILD: ${{ matrix.version }}
JAVA_TO_BUILD: ${{ matrix.version.name }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.variant }}
TARGET_OS: mac
Expand All @@ -161,7 +170,7 @@ jobs:
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.variant}}
name: ${{matrix.version.name}}-${{matrix.os}}-${{matrix.variant}}
path: workspace/target/*

- name: Unpack jdk
Expand All @@ -185,7 +194,7 @@ jobs:
name: Collect and Archive SmokeTest Results
if: failure()
with:
name: "${{matrix.version}}-${{matrix.os}}-${{matrix.variant}}_test_output"
name: "${{matrix.version.name}}-${{matrix.os}}-${{matrix.variant}}_test_output"
path: ./**/output_*/

build_windows:
Expand Down
5 changes: 3 additions & 2 deletions build-farm/platform-specific-configurations/mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ then
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi
else
if [[ "$JAVA_FEATURE_VERSION" -ge 17 ]] || [[ "${ARCHITECTURE}" == "aarch64" ]]; then
if [[ "$JAVA_FEATURE_VERSION" -ge 11 ]]; then
# JDK17 requires metal (included in full xcode) as does JDK11 on aarch64
# JDK11 on x64 is matched for consistency
XCODE_SWITCH_PATH="/Applications/Xcode.app"
else
# Command line tools used from JDK9-JDK16
# Command line tools used from JDK9-JDK10
XCODE_SWITCH_PATH="/";
fi
export PATH="/Users/jenkins/ccache-3.2.4:$PATH"
Expand Down
Loading