forked from googleapis/sdk-platform-java
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (68 loc) · 2.32 KB
/
nightly.yaml
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
name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *' # Nightly at 1am
defaults:
run:
shell: bash
jobs:
nightly:
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
java: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- run: mvn -version
- name: Install
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip
- 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/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
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 -Dcheckstyle.skip -DskipTests
- uses: actions/setup-java@v3
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
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly-java8 build on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"