-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (43 loc) · 1.26 KB
/
build.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
name: Build and test
on:
# Build PRs and branches.
pull_request:
paths-ignore:
- .github/workflows/deploy-tagged.yml
push:
branches:
- '**'
tags-ignore:
- '**'
paths-ignore:
- .github/workflows/deploy-tagged.yml
jobs:
build:
name: jdk ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
# https://en.wikipedia.org/wiki/Java_version_history
java: [ '8', '11' ] # LTS
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
# The Gradle wrapper's version (already the default, putting it here to clarity)
gradle-version: wrapper
# Removing unused files from Gradle User Home before saving to cache (i.e. older versions of gradle)
gradle-home-cache-cleanup: true
# Cache downloaded JDKs in addition to the default directories.
gradle-home-cache-includes: |
caches
notifications
jdks
- name: Build and test
run: ./gradlew build --stacktrace