File tree Expand file tree Collapse file tree 4 files changed +55
-11
lines changed
Expand file tree Collapse file tree 4 files changed +55
-11
lines changed Original file line number Diff line number Diff line change 11docker :
22 image : gcr.io/repo-automation-bots/owlbot-java:latest
3- digest : sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a
3+ digest : sha256:e56a9ac49143216f08cd6d5f7f8769b456ce35b576ae14dbbf8d9891bbb859c3
Original file line number Diff line number Diff line change 11on :
22 push :
33 branches :
4- - master
4+ - main
55 pull_request :
66name : ci
77jobs :
88 units :
99 runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
12- java : [8, 11]
12+ java : [8, 11, 17 ]
1313 steps :
1414 - uses : actions/checkout@v2
1515 - uses : stCarolas/setup-maven@v4
1616 with :
1717 maven-version : 3.8.1
18- - uses : actions/setup-java@v1
18+ - uses : actions/setup-java@v2
1919 with :
20+ distribution : zulu
2021 java-version : ${{matrix.java}}
2122 - run : java -version
2223 - run : .kokoro/build.sh
2930 - uses : stCarolas/setup-maven@v4
3031 with :
3132 maven-version : 3.8.1
32- - uses : actions/setup-java@v1
33+ - uses : actions/setup-java@v2
3334 with :
35+ distribution : zulu
3436 java-version : 8
3537 - run : java -version
3638 - run : .kokoro/build.bat
@@ -40,14 +42,15 @@ jobs:
4042 runs-on : ubuntu-latest
4143 strategy :
4244 matrix :
43- java : [8, 11]
45+ java : [8, 11, 17 ]
4446 steps :
4547 - uses : actions/checkout@v2
4648 - uses : stCarolas/setup-maven@v4
4749 with :
4850 maven-version : 3.8.1
49- - uses : actions/setup-java@v1
51+ - uses : actions/setup-java@v2
5052 with :
53+ distribution : zulu
5154 java-version : ${{matrix.java}}
5255 - run : java -version
5356 - run : .kokoro/dependencies.sh
5861 - uses : stCarolas/setup-maven@v4
5962 with :
6063 maven-version : 3.8.1
61- - uses : actions/setup-java@v1
64+ - uses : actions/setup-java@v2
6265 with :
66+ distribution : zulu
6367 java-version : 8
6468 - run : java -version
6569 - run : .kokoro/build.sh
7276 - uses : stCarolas/setup-maven@v4
7377 with :
7478 maven-version : 3.8.1
75- - uses : actions/setup-java@v1
79+ - uses : actions/setup-java@v2
7680 with :
81+ distribution : zulu
7782 java-version : 8
7883 - run : java -version
7984 - run : .kokoro/build.sh
Original file line number Diff line number Diff line change @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh
2828java -version
2929echo $JOB_TYPE
3030
31- export MAVEN_OPTS=" -Xmx1024m -XX:MaxPermSize=128m"
31+ function determineMavenOpts() {
32+ local javaVersion=$(
33+ # filter down to the version line, then pull out the version between quotes,
34+ # then trim the version number down to its minimal number (removing any
35+ # update or suffix number).
36+ java -version 2>&1 | grep " version" \
37+ | sed -E ' s/^.*"(.*?)".*$/\1/g' \
38+ | sed -E ' s/^(1\.[0-9]\.0).*$/\1/g'
39+ )
40+
41+ case $javaVersion in
42+ " 17" )
43+ # MaxPermSize is no longer supported as of jdk 17
44+ echo -n " -Xmx1024m"
45+ ;;
46+ * )
47+ echo -n " -Xmx1024m -XX:MaxPermSize=128m"
48+ ;;
49+ esac
50+ }
51+
52+ export MAVEN_OPTS=$( determineMavenOpts)
3253
3354# this should run maven enforcer
3455retry_with_backoff 3 10 \
Original file line number Diff line number Diff line change 5353 <findbugs .version>3.0.2</findbugs .version>
5454 <threeten .version>1.4.4</threeten .version>
5555 <truth .version>1.1.3</truth .version>
56- <mockito .version>1.10.19 </mockito .version>
56+ <mockito .version>2.28.2 </mockito .version>
5757 <hamcrest .version>2.2</hamcrest .version>
5858 </properties >
5959
383383 </plugins >
384384 </build >
385385 </profile >
386+ <profile >
387+ <id >jdk17</id >
388+ <activation >
389+ <jdk >[17,)</jdk >
390+ </activation >
391+ <build >
392+ <plugins >
393+ <plugin >
394+ <groupId >org.apache.maven.plugins</groupId >
395+ <artifactId >maven-surefire-plugin</artifactId >
396+ <configuration >
397+ <!-- TODO: eventually this shouldn't be necessary after things are fixed. -->
398+ <argLine >--add-opens java.base/java.io=ALL-UNNAMED</argLine >
399+ </configuration >
400+ </plugin >
401+ </plugins >
402+ </build >
403+ </profile >
386404 </profiles >
387405
388406 <reporting >
You can’t perform that action at this time.
0 commit comments