Skip to content

Commit

Permalink
Merge branch '8311530-depr-jsobject' into WIP-rm-jsobject
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrushforth committed Sep 4, 2024
2 parents 4842f50 + c3ee6ad commit de5929b
Show file tree
Hide file tree
Showing 834 changed files with 18,583 additions and 8,684 deletions.
2 changes: 1 addition & 1 deletion .github/actions/config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ runs:
id: read-config
run: |
# Extract value from configuration file
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
value="$(grep -h '^${{ inputs.var }}'= make/conf/github-actions.conf | cut -d '=' -f 2-)"
echo "value=$value" >> $GITHUB_OUTPUT
shell: bash
8 changes: 6 additions & 2 deletions .github/actions/upload-bundles/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -45,6 +45,7 @@ runs:
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
mkdir bundles
Expand All @@ -60,8 +61,11 @@ runs:
if [[ "$tests_bundle" != "" ]]; then
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
fi
if [[ "$static_libs_bundle" != "" ]]; then
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
fi
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
echo 'bundles-found=true' >> $GITHUB_OUTPUT
else
echo 'bundles-found=false' >> $GITHUB_OUTPUT
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/build-alpine-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

name: 'Build (alpine-linux)'

on:
workflow_call:
inputs:
platform:
required: true
type: string
extra-conf-options:
required: false
type: string
make-target:
required: false
type: string
default: 'product-bundles test-bundles'
debug-levels:
required: false
type: string
default: '[ "debug", "release" ]'
apk-extra-packages:
required: false
type: string
configure-arguments:
required: false
type: string
make-arguments:
required: false
type: string

jobs:
build-linux:
name: build
runs-on: ubuntu-22.04
container:
image: alpine:3.20

strategy:
fail-fast: false
matrix:
debug-level: ${{ fromJSON(inputs.debug-levels) }}
include:
- debug-level: debug
flags: --with-debug-level=fastdebug
suffix: -debug+

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4

- name: 'Install toolchain and dependencies'
run: |
apk update
apk add alpine-sdk alsa-lib-dev autoconf bash cups-dev cups-libs fontconfig-dev freetype-dev grep libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev linux-headers wget zip ${{ inputs.apk-extra-packages }}
- name: 'Get the BootJDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: alpine-linux-x64

- name: 'Configure'
run: >
bash configure
--with-conf-name=${{ inputs.platform }}
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-zlib=system
--with-jmod-compress=zip-1
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
8 changes: 6 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -133,8 +133,12 @@ jobs:
- name: 'Build'
id: build
uses: ./.github/actions/do-build
env:
# Only build static-libs-bundles for release builds.
# For debug builds, building static-libs often exceeds disk space.
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
with:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
configure-arguments:
description: 'Additional configure arguments'
required: false
Expand All @@ -57,11 +57,15 @@ jobs:
select:
name: 'Select platforms'
runs-on: ubuntu-22.04
env:
# List of platforms to exclude by default
EXCLUDED_PLATFORMS: 'alpine-linux-x64'
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
alpine-linux-x64: ${{ steps.include.outputs.alpine-linux-x64 }}
macos-x64: ${{ steps.include.outputs.macos-x64 }}
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
windows-x64: ${{ steps.include.outputs.windows-x64 }}
Expand All @@ -78,6 +82,10 @@ jobs:
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
# 'false' otherwise.
# arg $1: platform name or names to look for
# Convert EXCLUDED_PLATFORMS from a comma-separated string to an array
IFS=',' read -r -a excluded_array <<< "$EXCLUDED_PLATFORMS"
function check_platform() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
input='${{ github.event.inputs.platforms }}'
Expand All @@ -94,7 +102,13 @@ jobs:
normalized_input="$(echo ,$input, | tr -d ' ')"
if [[ "$normalized_input" == ",," ]]; then
# For an empty input, assume all platforms should run
# For an empty input, assume all platforms should run, except those in the EXCLUDED_PLATFORMS list
for excluded in "${excluded_array[@]}"; do
if [[ "$1" == "$excluded" ]]; then
echo 'false'
return
fi
done
echo 'true'
return
else
Expand All @@ -105,6 +119,14 @@ jobs:
return
fi
done
# If not explicitly included, check against the EXCLUDED_PLATFORMS list
for excluded in "${excluded_array[@]}"; do
if [[ "$1" == "$excluded" ]]; then
echo 'false'
return
fi
done
fi
echo 'false'
Expand All @@ -114,6 +136,7 @@ jobs:
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "alpine-linux-x64=$(check_platform alpine-linux-x64 alpine-linux x64)" >> $GITHUB_OUTPUT
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -221,6 +244,16 @@ jobs:
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-cross-compile == 'true'

build-alpine-linux-x64:
name: alpine-linux-x64
needs: select
uses: ./.github/workflows/build-alpine-linux.yml
with:
platform: alpine-linux-x64
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.alpine-linux-x64 == 'true'

build-macos-x64:
name: macos-x64
needs: select
Expand Down Expand Up @@ -344,6 +377,7 @@ jobs:
- build-linux-x64-hs-minimal
- build-linux-x64-hs-optimized
- build-linux-cross-compile
- build-alpine-linux-x64
- build-macos-x64
- build-macos-aarch64
- build-windows-x64
Expand Down
4 changes: 2 additions & 2 deletions make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
# Macosx release build and code signing available.

################################################################################
############################################################################
# JDK bundle
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
SRC := $(JDK_IMAGE_DIR), \
Expand Down Expand Up @@ -313,7 +313,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )

PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)

################################################################################
############################################################################
# JRE bundle
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
SRC := $(JRE_IMAGE_DIR), \
Expand Down
2 changes: 1 addition & 1 deletion make/CompileInterimLangtools.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.ja
$(SED) $(INTERIM_TOOL_PROVIDER_PATTERN) $< > $@

java.compiler.interim_EXTRA_FILES := \
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java

TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java

Expand Down
12 changes: 6 additions & 6 deletions make/CompileJavaModules.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.pr

CreateHkTargets = \
$(call FilterExcludedTranslations, \
$(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
$(subst /share/classes,, \
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
) \
), \
.properties \
$(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
$(subst /share/classes,, \
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
) \
), \
.properties \
)

################################################################################
Expand Down
13 changes: 7 additions & 6 deletions make/CompileToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
build/tools/deps \
build/tools/docs \
build/tools/jigsaw \
build/tools/depend \
, \
build/tools/depend, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
DISABLED_WARNINGS := dangling-doc-comments options, \
JAVAC_FLAGS := \
Expand All @@ -66,17 +65,19 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \

TARGETS += $(BUILD_TOOLS_JDK)

$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
$(eval $(call SetupCopyFiles, COPY_NIMBUS_TEMPLATES, \
SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), \
))

TARGETS += $(COPY_NIMBUS_TEMPLATES)

$(eval $(call SetupCopyFiles,COPY_CLDRCONVERTER_PROPERTIES, \
$(eval $(call SetupCopyFiles, COPY_CLDRCONVERTER_PROPERTIES, \
SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties)))
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties), \
))

TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES)

Expand Down
9 changes: 5 additions & 4 deletions make/CopyInterimTZDB.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include MakeBase.gmk

include CopyFiles.gmk

##########################################################################################
################################################################################

### TZDB tool needs files from java.time.zone package

Expand All @@ -41,12 +41,13 @@ define tzdb_copyfiles
< $(<) > $@
endef

$(eval $(call SetupCopyFiles,COPY_INTERIM_TZDB, \
$(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
SRC := $(TOPDIR)/src/java.base/share/classes/java/time/zone, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes/build/tools/tzdb, \
FILES := ZoneRules.java ZoneOffsetTransition.java ZoneOffsetTransitionRule.java Ser.java, \
MACRO := tzdb_copyfiles))
MACRO := tzdb_copyfiles, \
))

##########################################################################################
################################################################################

all: $(COPY_INTERIM_TZDB)
Loading

0 comments on commit de5929b

Please sign in to comment.