From 14c0d4a5e8a48d2307648ef495aa7cc4f8768f30 Mon Sep 17 00:00:00 2001 From: Matt <4009945+MattBDev@users.noreply.github.com> Date: Thu, 18 Feb 2021 14:19:37 -0500 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5945a80cd..b34be618d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 +