Skip to content

Commit

Permalink
Run build on both jdk 17 and 21 (#2722)
Browse files Browse the repository at this point in the history
* [build] Build on jdk 17 and 21

* [GHA] Run max-parallel at 4

* [gradle] Drop toolchain as not necessary

To show we run on multiple jdks, pulling toolchains misses the point.

* [ci] Add changelog

* [ci] Update PR on changelog

* [toolchains] Drop another toolchain use

* [build] Move max parallel to 6
  • Loading branch information
hazendaz authored Nov 29, 2023
1 parent a659725 commit 02f7366
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
java: [17, 21]
max-parallel: 6
runs-on: ${{ matrix.os }}
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: gradle
- uses: gradle/wrapper-validation-action@v1
- name: Download Eclipse on Ubuntu
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
### Added
- New detector finding `System.getenv()` calls, where the corresponding Java property could be used (See [ENV02-J](https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables)).

### Build
- Run build using jdk 17 and 21 without usage of toolchains so we do not defeat the purpose of building on both. ([#2722](https://github.com/spotbugs/spotbugs/pull/2722))

## 4.8.1 - 2023-11-06

### Fixed
Expand Down
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ subprojects {

group = 'com.github.spotbugs'
version = rootProject.version

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
}

allprojects {
Expand Down
3 changes: 0 additions & 3 deletions spotbugsTestCases/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ dependencies {
}

tasks.withType(JavaCompile).configureEach {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(17)
}
options.compilerArgs << '-Xlint:none'
options.encoding = 'UTF-8'
if (it.name == 'classesJava17') {
Expand Down

0 comments on commit 02f7366

Please sign in to comment.