-
Notifications
You must be signed in to change notification settings - Fork 121
82 lines (73 loc) · 2.32 KB
/
gradle.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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
GRADLE_OPTS: -Xmx1280m
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [11]
include:
- java: 11
os: ubuntu-latest
coverage: true
- java: 8
os: ubuntu-latest
- java: 14
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Restore Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/wrapper/dists
~/.gradle/caches/jars-3
~/.gradle/caches/modules-2
~/.gradle/caches/package-lists
~/.gradle/caches/sphinx-binary
~/.gradle/go/binary
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew --no-daemon --stacktrace -Pcoverage checkstyle check build
shell: bash
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
shell: bash
- name: Upload coverage to Codecov
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v1
- name: Collecting the test reports ..
if: failure()
run: find . '(' -name 'hs_err_*.log' -or -path '*/build/reports/tests' ')' -exec tar rf "reports-JVM-${{ matrix.java }}.tar" {} ';'
shell: bash
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v2
with:
name: reports-JVM-${{ matrix.java }}
path: reports-JVM-${{ matrix.java }}.tar
retention-days: 3
- name: Dump stuck threads
if: always()
run: jps | grep -vi "jps" | awk '{ print $1 }' | xargs -I'{}' jstack -l {} || true
shell: bash