Skip to content

Commit

Permalink
Test...
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Mar 4, 2023
1 parent 743c10e commit 6acef3e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-jdk11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and verify with JDK 11
on:
pull_request:
push:
branches: [ master ]
permissions:
contents: read
jobs:
transform-and-build:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: |
11.0.18
17.0.6
distribution: temurin
cache: maven
- name: Transform the source code to be JDK 11 compatible
run: mvn clean install -DskipTests -Dverification.skip && ./to-11.sh
- name: Build project against vanilla Error Prone, compile Javadoc
run: JAVA_HOME="JAVA_HOME_11_${env:RUNNER_ARCH}" mvn -T1C install javadoc:jar
- name: Build project with self-check against Error Prone fork
run: JAVA_HOME="JAVA_HOME_11_${env:RUNNER_ARCH}" mvn -T1C clean verify -Perror-prone-fork -Pnon-maven-central -Pself-check -s settings.xml
- name: Remove installed project artifacts
run: mvn build-helper:remove-project-artifact
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-22.04 ]
jdk: [ 11.0.16, 17.0.4, 19 ]
jdk: [ 17.0.4, 19 ]
distribution: [ temurin ]
experimental: [ false ]
include:
Expand Down
12 changes: 11 additions & 1 deletion to-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@

set -e -u -o pipefail

mvn clean test-compile fmt:format -T 1.0C -Perror-prone -Perror-prone-fork -Ppatch -Pself-check -Derror-prone.patch-checks=ErrorProneTestHelperSourceFormat -Derror-prone.self-check-args='-XepOpt:ErrorProneTestHelperSourceFormat:AvoidTextBlocks=true -Xep:MethodReferenceUsage:OFF' -Dverification.skip
# XXX: Clean this up.
mvn clean test-compile fmt:format \
-s "$(dirname "${0}")/settings.xml" \
-T 1.0C \
-Perror-prone \
-Perror-prone-fork \
-Ppatch \
-Pself-check \
-Derror-prone.patch-checks=ErrorProneTestHelperSourceFormat \
-Derror-prone.self-check-args='-XepOpt:ErrorProneTestHelperSourceFormat:AvoidTextBlocks=true -Xep:MethodReferenceUsage:OFF' \
-Dverification.skip

0 comments on commit 6acef3e

Please sign in to comment.