Skip to content

Commit b1407f2

Browse files
committed
Test against Java 11
1 parent 6abaacd commit b1407f2

File tree

2 files changed

+44
-22
lines changed

2 files changed

+44
-22
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: build
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
java: [ '8', '11' ]
18+
name: Java ${{ matrix.Java }} build
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up JDK
22+
uses: actions/setup-java@v2
23+
with:
24+
java-version: ${{ matrix.java }}
25+
distribution: adopt
26+
- name: Cache Gradle packages
27+
uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.gradle/caches
31+
~/.gradle/wrapper
32+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33+
restore-keys: |
34+
${{ runner.os }}-gradle-
35+
- name: Validate Gradle wrapper
36+
uses: gradle/wrapper-validation-action@v1
37+
- name: Build with Gradle
38+
run: ./gradlew build
39+
- name: Cleanup Gradle Cache
40+
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
41+
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
42+
run: |
43+
rm -f ~/.gradle/caches/modules-2/modules-2.lock
44+
rm -f ~/.gradle/caches/modules-2/gc.properties

.github/workflows/gradle-java8.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)