diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a46e96506a6..bdbb24c32ec 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,11 +11,17 @@ on: jobs: build: if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.clone_url != github.event.pull_request.head.repo.clone_url + name: ${{ matrix.os }}, Java-${{ matrix.jdkVersion }}, Eclipse ${{ matrix.targetPlatform }} strategy: matrix: - os: ['ubuntu-latest', 'macos-latest' ] # 'windows-latest' too flaky + os: ['ubuntu', 'macos' ] # 'windows-latest' too flaky + jdkVersion: ['11', '17'] + targetPlatform: ['r202203', 'latest'] # Only test latest and earliest platform + exclude: # Since Eclipse 2023-06 Java17 is required + - jdkVersion: 11 + targetPlatform: latest fail-fast: false - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }}-latest steps: - name: 'Check out repository' @@ -24,7 +30,9 @@ jobs: - name: 'Set up Java' uses: actions/setup-java@v3 with: - java-version: 17 + java-version: | + 11 + 17 distribution: 'temurin' - name: 'Cache Maven packages' @@ -37,7 +45,8 @@ jobs: - name: Build and test uses: coactions/setup-xvfb@v1 with: - run: mvn clean verify -PuseJenkinsSnapshots + run: "mvn clean verify --batch-mode --toolchains ../releng/toolchains.xml -PuseJenkinsSnapshots,strict-release-jdk \ + -Dtoolchain.jdk=${{ matrix.jdkVersion }} -Dtarget-platform-classifier=xtext-${{ matrix.targetPlatform }}" working-directory: org.eclipse.xtext.full.releng build-maven-artifacts: @@ -62,5 +71,5 @@ jobs: restore-keys: ${{ runner.os }}-maven - name: Build Maven artifacts - run: mvn clean verify -PuseJenkinsSnapshots + run: mvn clean verify --batch-mode -PuseJenkinsSnapshots working-directory: org.eclipse.xtext.maven.releng diff --git a/Jenkinsfile b/Jenkinsfile index 6147541ff4e..7fe6414b3d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -66,7 +66,7 @@ pipeline { xvnc(useXauthority: true) { sh """ ./full-build.sh --tp=${selectedTargetPlatform()} \ - ${javaVersion() == 17 ? '' : '--toolchains releng/toolchains.xml -Pstrict-release-jdk'} + --toolchains releng/toolchains.xml -Pstrict-release-jdk -Dtoolchain.jdk=${javaVersion()} """ } }// END steps diff --git a/pom.xml b/pom.xml index 5c9c7b688c0..ee68a10a7f9 100644 --- a/pom.xml +++ b/pom.xml @@ -402,6 +402,10 @@ strict-release-jdk + + + ${maven.compiler.release} + @@ -419,7 +423,7 @@ - ${maven.compiler.release} + ${toolchain.jdk}