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

Update JDK for CI build to 11 #608

Merged
merged 7 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 7 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,37 +48,16 @@ jobs:
# only build this on our default Java version but for all operating systems
# we are supporting. This allows for a fast execution and fast feedback. The
# extended tests will run later under certain conditions.
# If the OS is ubuntu, we also run the SonarCloud analysis.
Michael1993 marked this conversation as resolved.
Show resolved Hide resolved
basic:
runs-on: ${{ matrix.os }}-latest
needs: validation
timeout-minutes: 15
strategy:
matrix:
java: [ 8 ]
java: [ 11 ]
Michael1993 marked this conversation as resolved.
Show resolved Hide resolved
os: [ubuntu, macos, windows]
name: with Java ${{ matrix.java }} on ${{ matrix.os }}
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: 'gradle'
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: --refresh-dependencies --stacktrace --scan clean build

# SonarCloud analysis does not support Java 8, hence we need to execute the
# analysis separately with Java 11. This is fine because we are done with the basic
# builds for the contributors.
sonarcloud:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we really want to move the SonarCloud analysis into the basic build. Before:

grafik

Now:

grafik

IIRC so far a failing SonarCloud analysis wouldn't stop following jobs, because it represents a separate branch in the workflow. This is now no longer the case I believe.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't mind. I think we can commit to a stricter workflow.

runs-on: ubuntu-latest
needs: validation
timeout-minutes: 15
name: SonarCloud analysis
steps:
- name: Check out repo
uses: actions/checkout@v2
Expand All @@ -88,10 +67,11 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
java-version: ${{ matrix.java }}
distribution: temurin
cache: 'gradle'
- name: Cache SonarCloud results
if: ${{ matrix.os == 'ubuntu' }}
uses: actions/cache@v2
with:
path: ~/.sonar/cache/
Expand All @@ -101,6 +81,7 @@ jobs:
with:
arguments: --refresh-dependencies --stacktrace --scan clean build
- name: SonarCloud analysis
if: ${{ matrix.os == 'ubuntu' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: "61ab2579215aa8a0024a2f9368fc1298fdecfd18"
Expand All @@ -117,13 +98,10 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 11, 17 ]
junit-version: [ '5.7.2', '5.8.2' ]
modular: [true, false]
os: [ubuntu, macos, windows]
exclude:
- java: 8
modular: true
name: with Java ${{ matrix.java }}, JUnit ${{ matrix.junit-version }}, Modular ${{ matrix.modular }} on ${{ matrix.os }}
steps:
- name: Check out repo
Expand All @@ -139,7 +117,7 @@ jobs:
with:
arguments: --refresh-dependencies -PmodularBuild=${{ matrix.modular }} -PjunitVersion=${{ matrix.junit-version }} --stacktrace --scan clean build

# We want to be up to date and know issues with future Java versions as soon as possible.
# We want to be up-to-date and know issues with future Java versions as soon as possible.
# Furthermore, we also would love to see our build working with the latest Gradle version.
# As those builds might fail, they are allowed to fail, and should not prevent merges.
experimental:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ testCompile group: 'org.junit-pioneer', name: 'junit-pioneer', version: /*...*/

## Dependencies

JUnit Pioneer is built against Java 8, but comes as a module (i.e. with a `module-info.class`) named _org.junitpioneer_.
JUnit Pioneer is built against Java 8 (built with JDK 11), but comes as a module (i.e. with a `module-info.class`) named _org.junitpioneer_.
Michael1993 marked this conversation as resolved.
Show resolved Hide resolved
That means it can be used on all Java versions 8 and higher on class path and module path.

Pioneer does not only use JUnit 5's API, but also other artifacts from its ecosystem such as [`junit-platform-commons`](https://mvnrepository.com/artifact/org.junit.platform/junit-platform-commons).
Expand Down