-
Notifications
You must be signed in to change notification settings - Fork 1.1k
87 lines (86 loc) · 2.82 KB
/
sdk-platform-java-nightly.yaml
File metadata and controls
87 lines (86 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: sdk-platform-java Nightly
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *' # Nightly at 1am
defaults:
run:
shell: bash
env:
BUILD_SUBDIR: sdk-platform-java
jobs:
filter:
runs-on: ubuntu-latest
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
library:
- 'sdk-platform-java/**'
nightly:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ macos-15-intel, ubuntu-22.04, windows-2022 ]
java: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- run: mvn -version
- name: Install
run: mvn install --errors --batch-mode --no-transfer-progress -Pquick-build
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ macos-15-intel, ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
cache: maven
- run: mvn -version
- name: Install with Java 11
run: mvn install --errors --batch-mode --no-transfer-progress -Pquick-build -DskipTests
- uses: actions/setup-java@v5
with:
java-version: 8
distribution: temurin
- run: mvn -version
- name: Test with Java 8
# Direct goal invocation ("surefire:test") prevents recompiling tests
run: mvn surefire:test --errors --batch-mode --no-transfer-progress -Dfmt.skip
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly-java8 build on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"