forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (100 loc) · 3.74 KB
/
nightly-check-ci.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Nightly Check CI
on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule
# Note: this will set GITHUB_SHA to the latest commit on the default branch.
schedule:
# 2AM EST == 6AM UTC
- cron: '0 6 * * *'
push:
branches: [ 'nightly/**', 'release/v*' ]
jobs:
nightly:
strategy:
fail-fast: false
matrix:
gradle-task: ['check', 'testSerial', 'testParallel', 'testOutOfBand']
test-jvm-version: ['11', '17', '21', '22']
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-22.04
concurrency:
group: ${{ matrix.gradle-task }}-${{ matrix.test-jvm-version }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup JDK 21
id: setup-java-21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup JDK 22
id: setup-java-22
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '22'
- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV
- name: Setup gradle properties
run: |
.github/scripts/gradle-properties.sh >> gradle.properties
cat gradle.properties
- name: Run gradle ${{ matrix.gradle-task }} on java ${{ matrix.test-jvm-version }}
uses: burrunan/gradle-cache-action@v1
with:
job-id: gradle-run
arguments: --scan --continue --rerun-tasks ${{ matrix.gradle-task }} -PtestRuntimeVersion=${{ matrix.test-jvm-version }}
gradle-version: wrapper
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: nightly-${{ matrix.gradle-task }}-java${{ matrix.test-jvm-version }}-ci-results
path: |
**/build/test-results/**
**/build/reports/tests/**
- name: Upload JVM Error Logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: nightly-${{ matrix.gradle-task }}-java${{ matrix.test-jvm-version }}-ci-jvm-err
path: |
**/*_pid*.log
**/core.*
if-no-files-found: ignore
- name: Publish Test Results
uses: scacap/action-surefire-report@v1
if: ${{ github.repository_owner == 'deephaven' }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
with:
# We have to make a unique report per run https://github.com/ScaCap/action-surefire-report/issues/70
check_name: check report ${{ matrix.gradle-task }} java${{ matrix.test-jvm-version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/*/TEST-*.xml'
- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.25.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' }}
with:
payload: |
{
"slack_message": "Nightly build failure in ${{ matrix.gradle-task }} on Java ${{ matrix.test-jvm-version }} @ ${{ github.head_ref }} ${{ github.sha }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}