Update build.yml

This commit is contained in:
Matt 2021-02-18 14:19:37 -05:00 committed by GitHub
parent 80b6a100e8
commit 14c0d4a5e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 6 deletions

View File

@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
java: ["1.8", "11"]
os: ["ubuntu-18.04"]
os: ["ubuntu-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Checkout Repository"
@ -17,23 +17,23 @@ jobs:
with:
java-version: "${{ matrix.java }}"
- name: "Cache Gradle"
uses: "actions/cache@v2.1.3"
uses: "actions/cache@v2.1.4"
with:
path: |
"~/.gradle/caches"
"~/.gradle/wrapper"
key: "${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }}"
key: "${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
restore-keys: |
"${{ runner.os }}-${{ matrix.java }}-gradle-"
"${{ runner.os }}-gradle-"
- name: "Cache Local Maven Repository"
uses: "actions/cache@v2.1.3"
uses: "actions/cache@v2.1.4"
with:
path: "~/.m2/repository"
key: "${{ runner.os }}-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}"
restore-keys: |
"${{ runner.os }}-${{ matrix.java }}-maven-"
- name: "Cache BuildTools Decompiled Code"
uses: "actions/cache@v2.1.3"
uses: "actions/cache@v2.1.4"
with:
path: "$GITHUB_WORKSPACE/work"
key: "${{ runner.os }}-buildtools"
@ -47,4 +47,11 @@ jobs:
run: "java -jar BuildTools.jar --rev 1.16.5"
- name: "Clean Build"
run: "./gradlew clean build -x test sourcesJar javadocJar"
- 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