Skip to content

Commit

Permalink
Merge pull request quarkusio#36284 from gsmet/jdk-21
Browse files Browse the repository at this point in the history
Test Java 21 on CI
  • Loading branch information
gsmet authored Oct 24, 2023
2 parents 693bb15 + 1632b31 commit ee1d5a3
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 17 deletions.
21 changes: 21 additions & 0 deletions .github/ci-disk-usage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# this script might be useful to get some insights about the disk usage
# obviously, it needs to be tuned adjusted

# if you can actually write something to the disk and execute an action,
# using ncdu to dump an analysis of the disk and upload it as an artifact
# might be a better option that this adhoc script

echo "# df -h"
df -h
echo "# du -sh /"
sudo du -sh /* || true
echo "# du -sh /home/runner/work/quarkus/quarkus/integration-tests/*"
sudo du -sh /home/runner/work/quarkus/quarkus/integration-tests/* || true
echo "# docker images"
docker images || true
echo "# du -sh /var/lib/*"
sudo du -sh /var/lib/* || true
echo "# du -sh /opt/hostedtoolcache/*"
sudo du -sh /opt/hostedtoolcache/* || true
echo "# du -sh /imagegeneration/installers/*"
sudo du -sh /imagegeneration/installers/* || true
18 changes: 12 additions & 6 deletions .github/ci-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@
# alpine 3.14 dd53f409bf0b 4 months ago 5.6MB
# alpine 3.15 c4fc93816858 4 months ago 5.58MB

time docker rmi node:14 node:16 node:18 node:14-alpine node:16-alpine node:18-alpine buildpack-deps:buster buildpack-deps:bullseye
time sudo docker image prune --all --force || true
# That is 979M
time sudo rm -rf /usr/share/dotnet
time sudo rm -rf /usr/share/dotnet || true
# That is 1.7G
time sudo rm -rf /usr/share/swift
time sudo rm -rf /usr/share/swift || true
# Remove Android
time sudo rm -rf /usr/local/lib/android
time sudo rm -rf /usr/local/lib/android || true
# Remove Haskell
time sudo rm -rf /opt/ghc
time sudo rm -rf /opt/ghc || true
# Remove pipx
time sudo rm -rf /opt/pipx
time sudo rm -rf /opt/pipx || true

# Remove infrastructure things that are unused and take a lot of space
time sudo rm -rf /opt/hostedtoolcache/CodeQL || true
time sudo rm -rf /imagegeneration/installers/go-* || true
time sudo rm -rf /imagegeneration/installers/node-* || true
time sudo rm -rf /imagegeneration/installers/python-* || true
9 changes: 5 additions & 4 deletions .github/matrix-jvm-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
"os-name": "ubuntu-latest"
}
, {
"name": "20",
"java-version": 20,
"name": "21",
"java-version": 21,
"java-version-gradle": 20,
"maven_args": "$JVM_TEST_MAVEN_ARGS",
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g",
"maven_opts": "-Xmx3g -XX:MaxMetaspaceSize=1g",
"os-name": "ubuntu-latest"
}
, {
"name": "17 Windows",
"java-version": 17,
"maven_args": "-DskipDocs -Dformat.skip",
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g -Xlog:gc*=debug:file=windows-java-17.txt",
"os-name": "windows-latest"
"os-name": "windows-latest"
}]
18 changes: 17 additions & 1 deletion .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ jobs:
timeout-minutes: 400
env:
MAVEN_OPTS: ${{ matrix.java.maven_opts }}
JAVA_VERSION_GRADLE: ${{ matrix.java.java-version-gradle || matrix.java.java-version }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.jvm_matrix) }}
Expand Down Expand Up @@ -309,10 +310,25 @@ jobs:
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
run: .github/ci-prerequisites.sh

- name: Set up JDK ${{ matrix.java.java-version }}
- name: Set up JDK ${{ env.JAVA_VERSION_GRADLE }} for Gradle (if needed)
if: ${{ env.JAVA_VERSION_GRADLE != matrix.java.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java.java-version-gradle }}
architecture: ${{ matrix.java.architecture || 'x64' }}

- name: Set up GRADLE_JAVA_HOME (if needed)
if: ${{ env.JAVA_VERSION_GRADLE != matrix.java.java-version }}
run: |
JAVA_HOME_ARCHITECTURE=$(echo "${{ matrix.java.architecture || 'x64' }}" | tr [:lower:] [:upper:])
GRADLE_JAVA_HOME_VARIABLE="JAVA_HOME_${JAVA_VERSION_GRADLE}_${JAVA_HOME_ARCHITECTURE}"
echo "GRADLE_JAVA_HOME=${!GRADLE_JAVA_HOME_VARIABLE}" >> "$GITHUB_ENV"
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.java.java-distribution || 'temurin' }}
java-version: ${{ matrix.java.java-version }}
architecture: ${{ matrix.java.architecture || 'x64' }}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![License](https://img.shields.io/github/license/quarkusio/quarkus?style=for-the-badge&logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)
[![Project Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg?style=for-the-badge&logo=zulip)](https://quarkusio.zulipchat.com/)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?style=for-the-badge&logo=gitpod&logoColor=white)](https://gitpod.io/#https://github.com/quarkusio/quarkus/-/tree/main/)
[![Supported JVM Versions](https://img.shields.io/badge/JVM-11--17--19-brightgreen.svg?style=for-the-badge&logo=openjdk)](https://github.com/quarkusio/quarkus/actions/runs/113853915/)
[![Supported JVM Versions](https://img.shields.io/badge/JVM-11--17--21-brightgreen.svg?style=for-the-badge&logo=openjdk)](https://github.com/quarkusio/quarkus/actions/runs/113853915/)
[![Gradle Enterprise](https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?style=for-the-badge&logo=gradle)](https://ge.quarkus.io/scans)
[![GitHub Repo stars](https://img.shields.io/github/stars/quarkusio/quarkus?style=for-the-badge)](https://github.com/quarkusio/quarkus/stargazers)

Expand Down Expand Up @@ -45,4 +45,4 @@ Interested in when the next release is coming? Check our [release planning](http

## How to build Quarkus

The build instructions are available in the [contribution guide](CONTRIBUTING.md).
The build instructions are available in the [contribution guide](CONTRIBUTING.md).
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
<exclude name="testDestroyForSameCreationalContextOnly"/>
</methods>
</class>

<!-- https://github.com/jakartaee/cdi-tck/issues/485 -->
<class name="org.jboss.cdi.tck.tests.definition.bean.types.ManagedBeanTypesTest">
<methods>
<exclude name=".*"/>
</methods>
</class>
</classes>
</test>
</suite>
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testLambdaCapturing() {
final String resourceLambda = BASE_PKG + ".ResourceLambda";

assertRegistration("ResourceLambda", resourceLambda);
RestAssured.given().when().get("/reflection/lambda").then().body(startsWith("Comparator$$Lambda$"));
RestAssured.given().when().get("/reflection/lambda").then().body(startsWith("Comparator$$Lambda"));
}

private void assertRegistration(String expected, String queryParam) {
Expand Down
12 changes: 11 additions & 1 deletion integration-tests/scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>basic-test-suite</id>
Expand All @@ -127,5 +127,15 @@
<scala-maven-plugin.phase>none</scala-maven-plugin.phase>
</properties>
</profile>
<profile>
<id>java21</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>
</profile>
</profiles>
</project>
3 changes: 1 addition & 2 deletions integration-tests/virtual-threads/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<!-- gradle scan capture test logging disabled: System.out in virtual threads cause pinning when enabled. -->
<argLine>--enable-preview -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<argLine>-Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
Expand All @@ -131,7 +131,6 @@
<version>${version.compiler.plugin}</version>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
Expand Down
7 changes: 7 additions & 0 deletions tcks/jakarta-cdi/src/test/resources/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
<exclude name="testDestroyForSameCreationalContextOnly"/>
</methods>
</class>

<!-- https://github.com/jakartaee/cdi-tck/issues/485 -->
<class name="org.jboss.cdi.tck.tests.definition.bean.types.ManagedBeanTypesTest">
<methods>
<exclude name=".*"/>
</methods>
</class>
</classes>
</test>
</suite>

0 comments on commit ee1d5a3

Please sign in to comment.