Skip to content

Commit

Permalink
Merge branch 'master' into sbom_cyclonedx_shas
Browse files Browse the repository at this point in the history
  • Loading branch information
sxa authored Dec 5, 2023
2 parents aa070b4 + 5c41fcb commit 3a778aa
Show file tree
Hide file tree
Showing 21 changed files with 978 additions and 183 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build-autotriage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# Runs a script to triage the latest timer-initiated Temurin build pipelines.

name: "Build Autotriage"

on:
schedule:
- cron: '0 0 * * MON'

env:
TRIAGE_SCRIPT: "tooling/build_autotriage/build_autotriage.sh"

jobs:
Label:
runs-on: ubuntu-latest
name: Run Build Triage
steps:
- uses: actions/checkout@v3
- name: "Run Build Auto Triage"
run: bash "${PWD}/${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk22head

- name: Create Issue From File
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: JasonEtco/create-an-issue@v2
with:
filename: ./build_triage_output.md
47 changes: 36 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,36 @@ 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:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

# https://github.com/actions/runner-images/issues/6817
- name: (Mac) Workaround for homebrew
shell: bash
if: runner.os == 'macOS'
run: |
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/2to3-3.11 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/idle3.11 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/pydoc3.11 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3.11 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/python3.11-config || true
- name: Install Dependencies
run: |
brew install automake bash binutils freetype gnu-sed nasm
Expand All @@ -129,20 +148,26 @@ 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
export BUILD_ARGS="--skip-freetype --make-exploded-image --create-sbom"
# jdk11u+ uses two part exploded & assemble build
if [ ${{ matrix.version.name }} != "jdk8u" ]; then
export BUILD_ARGS="--make-exploded-image --create-sbom"
./build-farm/make-adopt-build-farm.sh
export BUILD_ARGS="--assemble-exploded-image --create-sbom"
./build-farm/make-adopt-build-farm.sh
Expand All @@ -151,7 +176,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 +186,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 +210,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
4 changes: 4 additions & 0 deletions build-farm/make-adopt-build-farm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ then
# To support reproducible-builds the jar/jmod --date option is required
# which is only available in jdk-17 and from jdk-19 so we cannot bootstrap with JDK16
JDK_BOOT_VERSION="17"
elif [ "${JAVA_FEATURE_VERSION}" == "21" ] && [ "${ARCHITECTURE}" == "riscv64" ]; then
# JDK20 has issues. No RVV fix for C910/C920 systems and
# does not run well in in docker containers
JDK_BOOT_VERSION="21"
elif [ "${JAVA_FEATURE_VERSION}" == "19" ]; then
JDK_BOOT_VERSION="19"
fi
Expand Down
9 changes: 7 additions & 2 deletions build-farm/platform-specific-configurations/aix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,17 @@ then
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-extra-ldflags=-lpthread --with-extra-cflags=-lpthread --with-extra-cxxflags=-lpthread"
fi

export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
if [[ "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

if [ "${VARIANT}" == "${BUILD_VARIANT_OPENJ9}" ]; then
export LDR_CNTRL=MAXDATA=0x80000000
fi
echo LDR_CNTRL=$LDR_CNTRL
echo LDR_CNTRL="$LDR_CNTRL"

BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR"
if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
Expand Down
9 changes: 7 additions & 2 deletions build-farm/platform-specific-configurations/alpine-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ fi
# ccache seems flaky on alpine
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --disable-ccache"

# We don't bundle freetype on alpine anymore, and expect the user to have it.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
if [[ "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
# We don't bundle freetype on alpine anymore, and expect the user to have it.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR"
if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
Expand Down
21 changes: 19 additions & 2 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=sbin/common/constants.sh
source "$SCRIPT_DIR/../../sbin/common/constants.sh"
# Bundling our own freetype can cause problems, so we skip that on linux.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"

if [[ "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
# Bundling our own freetype can cause problems, so we skip that on linux.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

NATIVE_API_ARCH=$(uname -m)
if [ "${NATIVE_API_ARCH}" = "x86_64" ]; then NATIVE_API_ARCH=x64; fi
Expand Down Expand Up @@ -196,6 +202,17 @@ then
export PATH=/opt/rh/devtoolset-2/root/usr/bin:$PATH
fi

## Fix For Issue https://github.com/adoptium/temurin-build/issues/3547
## Add Missing Library Path For Ubuntu 22+
if [ -e /etc/os-release ]; then
ID=$(grep "^ID=" /etc/os-release | awk -F'=' '{print $2}')
INT_VERSION_ID=$(grep "^VERSION_ID=" /etc/os-release | awk -F'"' '{print $2}' | awk -F'.' '{print $1}')
LIB_ARCH=$(uname -m)-linux-gnu
if [ "$ID" == "ubuntu" ] && [ "$INT_VERSION_ID" -ge "22" ]; then
export LIBRARY_PATH=/usr/lib/$LIB_ARCH:$LIBRARY_PATH
fi
fi

if [ "${ARCHITECTURE}" == "s390x" ]
then
export LANG=C
Expand Down
10 changes: 8 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 All @@ -67,6 +68,11 @@ else
fi
fi

if [[ "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
fi

# The configure option '--with-macosx-codesign-identity' is supported in JDK8 OpenJ9 and JDK11 and JDK14+
if [[ ( "$JAVA_FEATURE_VERSION" -eq 11 ) || ( "$JAVA_FEATURE_VERSION" -ge 14 ) ]]
then
Expand Down
5 changes: 5 additions & 0 deletions build-farm/platform-specific-configurations/windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ then
fi
fi

if [[ "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
fi

if [ "${ARCHITECTURE}" == "aarch64" ]; then
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --disable-ccache --openjdk-target=aarch64-unknown-cygwin"
fi
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx-lib/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<echo message="Downloading cyclonedx-core-java"/>
<download-file
destfile="cyclonedx-core-java.jar"
checksum="88193228f85a955127dc73e1c72efc9e08e18a01d227df47d0865dc20eceffd1"
checksum="ecc371d12808dfe76047f87f8235665d74dd6cf8ec12c41d052715a3fd79e0b5"
srcurl="https://ci.adoptium.net/view/all/job/build.getDependency/lastSuccessfulBuild/artifact/sbom_dependencies/cyclonedx-core-java.jar"
/>
</target>
Expand Down
9 changes: 6 additions & 3 deletions cyclonedx-lib/getDependencies
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ def fetchDeps() {
timeout(time: time_limit, unit: 'HOURS') {
try {
sh 'mkdir sbom_dependencies'

def cyclonedx_core_java_version = "7.3.2"


// These versions come from https://github.com/CycloneDX/cyclonedx-core-java/tags
// Version->spec mappings are in https://github.com/CycloneDX/cyclonedx-core-java#cyclonedx-schema-support
def cyclonedx_core_java_version = "8.0.3"
def jackson_core_version = "2.14.2"
def jackson_annotations_version = "2.14.2"
def jackson_databind_version = "2.14.2"
Expand All @@ -32,7 +35,7 @@ def fetchDeps() {
def commons_io_version = "2.11.0"
def github_package_url_version = "1.4.1"

fetchSingleFile("cyclonedx-core-java.jar", "88193228f85a955127dc73e1c72efc9e08e18a01d227df47d0865dc20eceffd1", "org/cyclonedx/cyclonedx-core-java/${cyclonedx_core_java_version}/cyclonedx-core-java-${cyclonedx_core_java_version}.jar")
fetchSingleFile("cyclonedx-core-java.jar", "ecc371d12808dfe76047f87f8235665d74dd6cf8ec12c41d052715a3fd79e0b5", "org/cyclonedx/cyclonedx-core-java/${cyclonedx_core_java_version}/cyclonedx-core-java-${cyclonedx_core_java_version}.jar")
fetchSingleFile("jackson-core.jar", "b5d37a77c88277b97e3593c8740925216c06df8e4172bbde058528df04ad3e7a", "com/fasterxml/jackson/core/jackson-core/${jackson_core_version}/jackson-core-${jackson_core_version}.jar")
fetchSingleFile("jackson-dataformat-xml.jar", "edbda6c775a36049cf0088b111ab958cca0dc70cb9326918d6cf153cb3fa426b", "com/fasterxml/jackson/dataformat/jackson-dataformat-xml/${jackson_databind_version}/jackson-dataformat-xml-${jackson_databind_version}.jar")
fetchSingleFile("jackson-databind.jar", "501d3abce4d18dcc381058ec593c5b94477906bba6efbac14dae40a642f77424", "com/fasterxml/jackson/core/jackson-databind/${jackson_databind_version}/jackson-databind-${jackson_databind_version}.jar")
Expand Down
Loading

0 comments on commit 3a778aa

Please sign in to comment.