3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-29 04:10:07 +01:00
FastAsyncWorldEdit/.github/workflows/build.yml

Revisionen in .git-blame-ignore-revs werden ignoriert. Klicke hier, um das zu umgehen und die normale Blame-Ansicht zu sehen.

59 Zeilen
2.0 KiB
YAML

2020-11-23 18:49:08 +01:00
name: "build"
on: ["pull_request", "push"]
jobs:
build:
strategy:
matrix:
2021-04-05 23:02:56 +02:00
java: ["8", "11"]
2021-02-18 20:19:37 +01:00
os: ["ubuntu-latest"]
2020-11-23 18:49:08 +01:00
runs-on: "${{ matrix.os }}"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v2.3.4"
- name: "Setup JDK ${{ matrix.java }}"
2021-04-05 23:02:56 +02:00
uses: "actions/setup-java@v2"
2020-11-23 18:49:08 +01:00
with:
2021-04-05 23:02:56 +02:00
distribution: "adopt"
2020-11-23 18:49:08 +01:00
java-version: "${{ matrix.java }}"
- name: "Cache Gradle"
2021-02-18 20:19:37 +01:00
uses: "actions/cache@v2.1.4"
2020-11-23 18:49:08 +01:00
with:
path: |
"~/.gradle/caches"
"~/.gradle/wrapper"
2021-02-18 20:19:37 +01:00
key: "${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
2020-11-23 18:49:08 +01:00
restore-keys: |
2021-02-18 20:19:37 +01:00
"${{ runner.os }}-gradle-"
2020-11-23 18:49:08 +01:00
- name: "Cache Local Maven Repository"
2021-02-18 20:19:37 +01:00
uses: "actions/cache@v2.1.4"
2020-11-23 18:49:08 +01:00
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"
2021-02-18 20:19:37 +01:00
uses: "actions/cache@v2.1.4"
2020-11-23 18:49:08 +01:00
with:
path: "$GITHUB_WORKSPACE/work"
key: "${{ runner.os }}-buildtools"
restore-keys: |
"${{ runner.os }}-buildtools"
- name: "Test Enviornment"
run: "echo $GITHUB_WORKSPACE"
- name: "Download BuildTools"
run: "wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
- name: "Run BuildTools"
2021-01-19 19:50:43 +01:00
run: "java -jar BuildTools.jar --rev 1.16.5"
2020-11-23 18:49:08 +01:00
- name: "Clean Build"
2021-01-31 09:31:06 +01:00
run: "./gradlew clean build -x test sourcesJar javadocJar"
2021-02-18 20:19:37 +01:00
- 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
2020-11-23 18:49:08 +01:00