5353 id : date
5454 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
5555 - uses : actions/checkout@v4
56+ - uses : actions/setup-java@v4
57+ with :
58+ java-version : 8
59+ distribution : temurin
60+ - name : " Set jvm system property environment variable for surefire plugin (unit tests)"
61+ # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
62+ # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
63+ run : echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
64+ shell : bash
65+ - uses : actions/setup-java@v4
66+ with :
67+ java-version : 11
68+ distribution : temurin
69+ cache : maven
70+ - uses : actions/cache@v4
71+ id : mvn-cache
72+ with :
73+ path : ~/.m2/repository
74+ key : ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
75+ - run : .kokoro/build.sh
76+ shell : bash
77+ env :
78+ JOB_TYPE : test
79+ JOB_NAME : units-8-runtime-${{matrix.java}}
80+ # detect which libraries have changed
81+ changes :
82+ runs-on : ubuntu-latest
83+ permissions :
84+ pull-requests : read
85+ outputs :
86+ packages : ${{ steps.filter.outputs.changes }}
87+ steps :
88+ - uses : dorny/paths-filter@v4
89+ id : filter
90+ with :
91+ filters : |
92+ java-bigquery: java-bigquery/**
93+ java-bigquerystorage: java-bigquerystorage/**
94+ java-datastore: java-datastore/**
95+ java-logging: java-logging/**
96+ java-logging-logback: java-logging-logback/**
97+ java-spanner: java-spanner/**
98+ sdk-platform-java: sdk-platform-java/**
99+ split-units :
100+ runs-on : ubuntu-latest
101+ needs : changes
102+ strategy :
103+ fail-fast : false
104+ matrix :
105+ package : ${{ fromJSON(needs.changes.outputs.packages) }}
106+ java : [11, 17, 21, 25]
107+ steps :
108+ - name : Get current week within the year
109+ id : date
110+ run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
111+ - uses : actions/checkout@v4
112+ - uses : actions/setup-java@v4
113+ with :
114+ distribution : temurin
115+ java-version : ${{matrix.java}}
116+ - run : .kokoro/build.sh
117+ env :
118+ BUILD_SUBDIR : ${{matrix.package}}
119+ JOB_TYPE : test
120+ JOB_NAME : units-${{matrix.package}}-${{matrix.java}}
121+ split-units-8 :
122+ runs-on : ubuntu-latest
123+ name : " split-units"
124+ needs : changes
125+ strategy :
126+ fail-fast : false
127+ matrix :
128+ package : ${{ fromJSON(needs.changes.outputs.packages) }}
129+ java : [8]
130+ steps :
131+ - name : Get current week within the year
132+ id : date
133+ run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
134+ - uses : actions/checkout@v4
56135 - uses : actions/setup-java@v4
57136 with :
58137 java-version : 11
@@ -66,27 +145,30 @@ jobs:
66145 key : ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
67146 - name : Install all modules using Java 11
68147 shell : bash
69- run : |
70- mvn -V -B -ntp clean install -Pfast -DskipTests
71- working-directory : sdk-platform-java
148+ run : .kokoro/build.sh
149+ env :
150+ BUILD_SUBDIR : ${{matrix.package}}
151+ JOB_TYPE : install
72152 - uses : actions/setup-java@v4
73153 with :
74- java-version : 8
154+ java-version : ${{matrix.java}}
75155 distribution : temurin
76156 - run : java -version
77- - name : Run tests in Java 8 with the source compiled in Java 11
157+ - name : Run tests in Java ${{matrix.java}} with the source compiled in Java 11
78158 run : |
79159 mvn test \
80160 -B -ntp \
81161 -Pfast \
82162 -Dorg.slf4j.simpleLogger.showDateTime=true \
83163 -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
84164 -Dmaven.wagon.http.retryHandler.count=5 \
165+ --also-make \
85166 -T 1C
86167 env :
168+ BUILD_SUBDIR : ${{matrix.package}}
87169 JOB_TYPE : test
88170 JOB_NAME : units-8-runtime-${{matrix.java}}
89- working-directory : sdk-platform-java
171+ working-directory : ${{matrix.package}}
90172 windows :
91173 runs-on : windows-latest
92174 steps :
0 commit comments