|
53 | 53 | GOOGLE_SDK_JAVA_LOGGING: true |
54 | 54 | working-directory: sdk-platform-java |
55 | 55 |
|
| 56 | + clirr: |
| 57 | + needs: filter |
| 58 | + if: ${{ needs.filter.outputs.library == 'true' }} |
| 59 | + runs-on: ubuntu-22.04 |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v3 |
| 62 | + - uses: actions/setup-java@v3 |
| 63 | + with: |
| 64 | + distribution: temurin |
| 65 | + java-version: 11 |
| 66 | + - run: java -version |
| 67 | + - run: .kokoro/build.sh |
| 68 | + env: |
| 69 | + JOB_TYPE: clirr |
| 70 | + BUILD_SUBDIR: sdk-platform-java |
| 71 | + |
56 | 72 | sdk-platform-java-8: |
57 | 73 | needs: filter |
58 | 74 | if: ${{ needs.filter.outputs.library == 'true' }} |
@@ -284,202 +300,6 @@ jobs: |
284 | 300 | echo "All class files are compatible with Java 8." |
285 | 301 | working-directory: sdk-platform-java |
286 | 302 |
|
287 | | - build-java8-showcase: |
288 | | - needs: filter |
289 | | - if: ${{ needs.filter.outputs.library == 'true' }} |
290 | | - name: "build(8) for showcase" |
291 | | - runs-on: ubuntu-22.04 |
292 | | - steps: |
293 | | - - uses: actions/checkout@v4 |
294 | | - - uses: actions/setup-java@v4 |
295 | | - with: |
296 | | - java-version: 11 |
297 | | - distribution: temurin |
298 | | - cache: maven |
299 | | - - name: Install all modules using Java 11 |
300 | | - shell: bash |
301 | | - run: .kokoro/build.sh |
302 | | - env: |
303 | | - BUILD_SUBDIR: sdk-platform-java |
304 | | - JOB_TYPE: install |
305 | | - - uses: actions/setup-java@v3 |
306 | | - with: |
307 | | - java-version: 8 |
308 | | - distribution: temurin |
309 | | - - run: java -version |
310 | | - - name: Parse showcase version |
311 | | - working-directory: sdk-platform-java/java-showcase/gapic-showcase |
312 | | - run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV" |
313 | | - - name: Install showcase server |
314 | | - run: | |
315 | | - sudo mkdir -p /usr/src/showcase |
316 | | - sudo chown -R ${USER} /usr/src/ |
317 | | - curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz |
318 | | - cd /usr/src/showcase/ |
319 | | - tar -xf showcase-* |
320 | | - ./gapic-showcase run & |
321 | | - cd - |
322 | | - - name: Showcase integration tests |
323 | | - working-directory: sdk-platform-java/java-showcase |
324 | | - run: | |
325 | | - mvn verify \ |
326 | | - -P enable-integration-tests \ |
327 | | - --batch-mode \ |
328 | | - --no-transfer-progress |
329 | | - # The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set |
330 | | - - name: Showcase integration tests - Logging SLF4J 1.x |
331 | | - working-directory: sdk-platform-java/java-showcase |
332 | | - run: | |
333 | | - mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \ |
334 | | - --batch-mode \ |
335 | | - --no-transfer-progress |
336 | | - # Set the Env Var for this step only |
337 | | - env: |
338 | | - GOOGLE_SDK_JAVA_LOGGING: true |
339 | | - # The `disabledLogging` profile tests logging disabled when logging dependency present, |
340 | | - # do not set env var for this step |
341 | | - - name: Showcase integration tests - Logging disabed |
342 | | - working-directory: sdk-platform-java/java-showcase |
343 | | - run: | |
344 | | - mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \ |
345 | | - --batch-mode \ |
346 | | - --no-transfer-progress |
347 | | - - name: Showcase integration tests - Protobuf gen code 3.25.8 |
348 | | - working-directory: sdk-platform-java/java-showcase-3.25.8 |
349 | | - run: | |
350 | | - mvn verify \ |
351 | | - -P enable-integration-tests \ |
352 | | - --batch-mode \ |
353 | | - --no-transfer-progress |
354 | | - - name: Showcase integration tests - Protobuf gen code 3.21.0 |
355 | | - working-directory: sdk-platform-java/java-showcase-3.21.0 |
356 | | - run: | |
357 | | - mvn verify \ |
358 | | - -P enable-integration-tests \ |
359 | | - --batch-mode \ |
360 | | - --no-transfer-progress |
361 | | - showcase: |
362 | | - needs: filter |
363 | | - if: ${{ needs.filter.outputs.library == 'true' }} |
364 | | - runs-on: ubuntu-22.04 |
365 | | - strategy: |
366 | | - matrix: |
367 | | - java: [ 11, 17, 21, 25 ] |
368 | | - steps: |
369 | | - - uses: actions/checkout@v4 |
370 | | - - uses: actions/setup-java@v4 |
371 | | - with: |
372 | | - java-version: ${{ matrix.java }} |
373 | | - distribution: temurin |
374 | | - - run: mvn -version |
375 | | - - name: Install Maven modules |
376 | | - shell: bash |
377 | | - run: .kokoro/build.sh |
378 | | - env: |
379 | | - BUILD_SUBDIR: sdk-platform-java |
380 | | - JOB_TYPE: test |
381 | | - - name: Showcase golden tests |
382 | | - working-directory: sdk-platform-java/java-showcase |
383 | | - run: | |
384 | | - mvn test \ |
385 | | - -P enable-golden-tests \ |
386 | | - --batch-mode \ |
387 | | - --no-transfer-progress |
388 | | - - name: Parse showcase version |
389 | | - working-directory: sdk-platform-java/java-showcase/gapic-showcase |
390 | | - run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV" |
391 | | - - name: Install showcase server |
392 | | - run: | |
393 | | - sudo mkdir -p /usr/src/showcase |
394 | | - sudo chown -R ${USER} /usr/src/ |
395 | | - curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz |
396 | | - cd /usr/src/showcase/ |
397 | | - tar -xf showcase-* |
398 | | - ./gapic-showcase run & |
399 | | - cd - |
400 | | - - name: Showcase integration tests |
401 | | - working-directory: sdk-platform-java/java-showcase |
402 | | - run: | |
403 | | - mvn verify \ |
404 | | - -P enable-integration-tests \ |
405 | | - --batch-mode \ |
406 | | - --no-transfer-progress |
407 | | - # The `slf4j2_logback` profile brings logging dependency and compiles logging tests, require env var to be set |
408 | | - - name: Showcase integration tests - Logging SLF4J 2.x |
409 | | - working-directory: sdk-platform-java/java-showcase |
410 | | - run: | |
411 | | - mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j2_logback' \ |
412 | | - --batch-mode \ |
413 | | - --no-transfer-progress |
414 | | - # Set the Env Var for this step only |
415 | | - env: |
416 | | - GOOGLE_SDK_JAVA_LOGGING: true |
417 | | - # The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set |
418 | | - - name: Showcase integration tests - Logging SLF4J 1.x |
419 | | - working-directory: sdk-platform-java/java-showcase |
420 | | - run: | |
421 | | - mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \ |
422 | | - --batch-mode \ |
423 | | - --no-transfer-progress |
424 | | - # Set the Env Var for this step only |
425 | | - env: |
426 | | - GOOGLE_SDK_JAVA_LOGGING: true |
427 | | - # The `disabledLogging` profile tests logging disabled when logging dependency present, |
428 | | - # do not set env var for this step |
429 | | - - name: Showcase integration tests - Logging disabed |
430 | | - working-directory: sdk-platform-java/java-showcase |
431 | | - run: | |
432 | | - mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \ |
433 | | - --batch-mode \ |
434 | | - --no-transfer-progress |
435 | | - - name: Showcase integration tests - Protobuf 3 compatibility with third party library Tensorflow |
436 | | - working-directory: sdk-platform-java/java-showcase |
437 | | - run: | |
438 | | - mvn clean verify -P 'enable-integration-tests,protobuf3,showcase' \ |
439 | | - --batch-mode \ |
440 | | - --no-transfer-progress |
441 | | -
|
442 | | - showcase-clirr: |
443 | | - needs: filter |
444 | | - if: ${{ (needs.filter.outputs.library == 'true') && github.base_ref != '' }} # Only execute on pull_request trigger event |
445 | | - runs-on: ubuntu-22.04 |
446 | | - steps: |
447 | | - - name: Checkout @ target branch |
448 | | - uses: actions/checkout@v4 |
449 | | - with: |
450 | | - ref: ${{ github.base_ref }} |
451 | | - - uses: actions/setup-java@v4 |
452 | | - with: |
453 | | - java-version: 17 |
454 | | - distribution: temurin |
455 | | - cache: maven |
456 | | - - name: Install Maven modules |
457 | | - shell: bash |
458 | | - run: .kokoro/build.sh |
459 | | - env: |
460 | | - BUILD_SUBDIR: sdk-platform-java |
461 | | - JOB_TYPE: install |
462 | | - - name: Install showcase to local maven repository |
463 | | - run: | |
464 | | - mvn install -B -ntp -T 1C -DskipTests |
465 | | - SHOWCASE_CLIENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) |
466 | | - echo "SHOWCASE_CLIENT_VERSION=$SHOWCASE_CLIENT_VERSION" >> "$GITHUB_ENV" |
467 | | - working-directory: sdk-platform-java/java-showcase |
468 | | - - name: Checkout sdk-platform-java @ PR merge commit |
469 | | - uses: actions/checkout@v3 |
470 | | - - name: Install sdk-platform-java @ PR merge commit |
471 | | - shell: bash |
472 | | - run: .kokoro/build.sh |
473 | | - env: |
474 | | - JOB_TYPE: install |
475 | | - BUILD_SUBDIR: sdk-platform-java |
476 | | - # Showcase golden test ensures that src changes are already reflected in the PR. |
477 | | - - name: Clirr check |
478 | | - working-directory: sdk-platform-java/java-showcase |
479 | | - run: | |
480 | | - mvn versions:set -B -ntp -DnewVersion=local |
481 | | - mvn clirr:check -B -ntp -DcomparisonVersion=$SHOWCASE_CLIENT_VERSION |
482 | | -
|
483 | 303 | gapic-generator-java-bom: |
484 | 304 | needs: filter |
485 | 305 | if: ${{ needs.filter.outputs.library == 'true' }} |
|
0 commit comments