Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +01:00
Reduce gh actions time by ~75% (~6 minutes)
Dieser Commit ist enthalten in:
Ursprung
844691fa2c
Commit
aae5d037db
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@ -4,10 +4,7 @@ on: ["pull_request", "push"]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
runs-on: "ubuntu-20.04"
|
||||||
matrix:
|
|
||||||
os: ["ubuntu-latest"]
|
|
||||||
runs-on: "${{ matrix.os }}"
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
uses: "actions/checkout@v2.3.4"
|
uses: "actions/checkout@v2.3.4"
|
||||||
@ -16,40 +13,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: "adopt"
|
distribution: "adopt"
|
||||||
java-version: "16"
|
java-version: "16"
|
||||||
- name: "Cache Gradle"
|
|
||||||
uses: "actions/cache@v2.1.6"
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
"~/.gradle/caches"
|
|
||||||
"~/.gradle/wrapper"
|
|
||||||
key: "${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
|
|
||||||
restore-keys: |
|
|
||||||
"${{ runner.os }}-gradle-"
|
|
||||||
- name: "Cache Local Maven Repository"
|
|
||||||
uses: "actions/cache@v2.1.6"
|
|
||||||
with:
|
|
||||||
path: "~/.m2/repository"
|
|
||||||
key: "${{ runner.os }}-11-maven-${{ hashFiles('**/pom.xml') }}"
|
|
||||||
restore-keys: |
|
|
||||||
"${{ runner.os }}-11-maven-"
|
|
||||||
- name: "Cache BuildTools Decompiled Code"
|
|
||||||
uses: "actions/cache@v2.1.6"
|
|
||||||
with:
|
|
||||||
path: "$GITHUB_WORKSPACE/work"
|
|
||||||
key: "${{ runner.os }}-buildtools"
|
|
||||||
restore-keys: |
|
|
||||||
"${{ runner.os }}-buildtools"
|
|
||||||
- name: "Test Environment"
|
|
||||||
run: "echo $GITHUB_WORKSPACE"
|
|
||||||
- name: "Download BuildTools"
|
|
||||||
run: "wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
|
|
||||||
- name: "Run BuildTools"
|
|
||||||
run: "java -jar BuildTools.jar --rev 1.17.1"
|
|
||||||
- name: "Clean Build"
|
- name: "Clean Build"
|
||||||
run: "./gradlew clean build sourcesJar javadocJar -x test"
|
run: "./gradlew clean build -x test"
|
||||||
- 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
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren