diff --git a/.github/actions/get-msys2/action.yml b/.github/actions/get-msys2/action.yml index 3e6c3417a311d..27726245c15dc 100644 --- a/.github/actions/get-msys2/action.yml +++ b/.github/actions/get-msys2/action.yml @@ -30,7 +30,8 @@ runs: using: composite steps: - name: 'Install MSYS2' - uses: msys2/setup-msys2@v2 + # use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release + uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff with: install: 'autoconf tar unzip zip make' path-type: minimal diff --git a/.github/workflows/build-cross-compile.yml b/.github/workflows/build-cross-compile.yml index 168c5924d8610..d4a31714d73c2 100644 --- a/.github/workflows/build-cross-compile.yml +++ b/.github/workflows/build-cross-compile.yml @@ -35,7 +35,7 @@ on: apt-gcc-version: required: false type: string - default: '10.3.0-1ubuntu1~20.04' + default: '10.4.0-4ubuntu1~22.04' apt-gcc-cross-suffix: required: false type: string @@ -44,7 +44,7 @@ on: jobs: build-cross-compile: name: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -54,20 +54,34 @@ jobs: - arm - s390x - ppc64le + - riscv64 include: - target-cpu: aarch64 - debian-arch: arm64 gnu-arch: aarch64 + debian-arch: arm64 + debian-repository: https://httpredir.debian.org/debian/ + debian-version: buster - target-cpu: arm - debian-arch: armhf gnu-arch: arm + debian-arch: armhf + debian-repository: https://httpredir.debian.org/debian/ + debian-version: buster gnu-abi: eabihf - target-cpu: s390x - debian-arch: s390x gnu-arch: s390x + debian-arch: s390x + debian-repository: https://httpredir.debian.org/debian/ + debian-version: buster - target-cpu: ppc64le - debian-arch: ppc64el gnu-arch: powerpc64le + debian-arch: ppc64el + debian-repository: https://httpredir.debian.org/debian/ + debian-version: buster + - target-cpu: riscv64 + gnu-arch: riscv64 + debian-arch: riscv64 + debian-repository: https://deb.debian.org/debian-ports + debian-version: sid steps: - name: 'Checkout the JDK source' @@ -118,9 +132,9 @@ jobs: --verbose --include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev --resolve-deps - buster + ${{ matrix.debian-version }} sysroot - https://httpredir.debian.org/debian/ + ${{ matrix.debian-repository }} if: steps.get-cached-sysroot.outputs.cache-hit != 'true' - name: 'Prepare sysroot' diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 86fdba8670fe8..d8ff96712596c 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -92,12 +92,26 @@ jobs: id: gtest uses: ./.github/actions/get-gtest + - name: 'Check toolchain installed' + id: toolchain-check + run: | + set +e + '/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }} + if [ $? -eq 0 ]; then + echo "Toolchain is already installed" + echo "toolchain-installed=true" >> $GITHUB_OUTPUT + else + echo "Toolchain is not yet installed" + echo "toolchain-installed=false" >> $GITHUB_OUTPUT + fi + - name: 'Install toolchain and dependencies' run: | # Run Visual Studio Installer '/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \ - modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \ + modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \ --add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }} + if: steps.toolchain-check.outputs.toolchain-installed != 'true' - name: 'Configure' run: > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4577be3248b08..ed159046d0b0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,19 +71,17 @@ jobs: # 'false' otherwise. # arg $1: platform name or names to look for function check_platform() { - if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then - # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything - echo 'false' - return - fi - if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then input='${{ github.event.inputs.platforms }}' elif [[ $GITHUB_EVENT_NAME == push ]]; then - input='${{ secrets.JDK_SUBMIT_PLATFORMS }}' - else - echo 'Internal error in GHA' - exit 1 + if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then + # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything + >&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch' + echo 'false' + return + else + input='${{ secrets.JDK_SUBMIT_PLATFORMS }}' + fi fi normalized_input="$(echo ,$input, | tr -d ' ')" @@ -204,7 +202,7 @@ jobs: uses: ./.github/workflows/build-macos.yml with: platform: macos-x64 - xcode-toolset-version: '11.7' + xcode-toolset-version: '12.5.1' if: needs.select.outputs.macos-x64 == 'true' build-macos-aarch64: @@ -213,7 +211,7 @@ jobs: uses: ./.github/workflows/build-macos.yml with: platform: macos-aarch64 - xcode-toolset-version: '12.4' + xcode-toolset-version: '12.5.1' extra-conf-options: '--openjdk-target=aarch64-apple-darwin' if: needs.select.outputs.macos-aarch64 == 'true' @@ -223,7 +221,7 @@ jobs: uses: ./.github/workflows/build-windows.yml with: platform: windows-x64 - msvc-toolset-version: '14.25' + msvc-toolset-version: '14.29' msvc-toolset-architecture: 'x86.x64' if: needs.select.outputs.windows-x64 == 'true' diff --git a/.gitignore b/.gitignore index 6787b23253522..d0736707b804a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ NashornProfile.txt /src/utils/LogCompilation/target/ /.project/ /.settings/ +/compile_commands.json +/.cache diff --git a/.jcheck/conf b/.jcheck/conf index 495417d197213..ab251de5d4f13 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=17.0.7 +version=17.0.9 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists diff --git a/bin/jib.sh b/bin/jib.sh index aab198990ccd0..9f34cf9ab7b6d 100644 --- a/bin/jib.sh +++ b/bin/jib.sh @@ -128,6 +128,15 @@ install_jib() { exit 1 fi fi + # Want to check the filetype using file, to see if we got served a HTML error page. + # This is sensitive to the filename containing a specific string, but good enough. + file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null + if [ $? -ne 0 ]; then + echo "Warning: ${installed_jib_script}.gz is not a gzip file." + echo "If you are behind a proxy you may need to configure exceptions using no_proxy." + echo "The download URL was: ${jib_url}" + exit 1 + fi echo "Extracting JIB bootstrap script" rm -f "${installed_jib_script}" gunzip "${installed_jib_script}.gz" diff --git a/doc/building.html b/doc/building.html index 49035c0d625ef..f92b3680009f3 100644 --- a/doc/building.html +++ b/doc/building.html @@ -273,7 +273,7 @@
All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.
The minimum accepted version of gcc is 5.0. Older versions will generate a warning by configure
and are unlikely to work.
The JDK is currently known to be able to compile with at least version 10.2 of gcc.
+The JDK is currently known to be able to compile with at least version 11.2 of gcc.
In general, any version between these two should be usable.
The minimum accepted version of clang is 3.5. Older versions will not be accepted by configure
.
For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.
Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.
-Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.
For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses CTRL + F1
key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect "Turn keyboard access on or off" option which is responsible for CTRL + F1
combination.
Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.
-Type gpedit
in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.
Note: restart is required to make the settings take effect.
+Most automated Client UI tests use Robot
API to control
+the UI. Usually, the default operating system settings need to be
+adjusted for Robot to work correctly. The detailed steps how to access
+and update these settings for different platforms are provided
+below.
Robot
is not permitted to control your Mac by default
+since macOS 10.15. To allow it, choose Apple menu -> System Settings,
+click Privacy & Security; then click Accessibility and ensure the
+following apps are allowed to control your computer: Java and
+Terminal. If the tests are run from an IDE, the IDE should be
+granted this permission too.
On Windows if Cygwin terminal is used to run the tests, there is a
+delay in focus transfer. Usually it causes automated UI test failure. To
+disable the delay, type regedit
in the Search and then
+select Registry Editor; navigate to the following key:
+HKEY_CURRENT_USER\Control Panel\Desktop
; make sure the
+ForegroundLockTimeout
value is set to 0.
Additional information about Client UI tests configuration for +various operating systems can be obtained at Automated +client GUI testing system set up requirements