mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 19:06:07 +00:00
036e8473b4
* Fixed unit tests and determine chunksStretched based on package version * Fixed requested changes
59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
name: "build"
|
|
|
|
on: ["pull_request", "push"]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
java: ["8", "11"]
|
|
os: ["ubuntu-latest"]
|
|
runs-on: "${{ matrix.os }}"
|
|
steps:
|
|
- name: "Checkout Repository"
|
|
uses: "actions/checkout@v2.3.4"
|
|
- name: "Setup JDK ${{ matrix.java }}"
|
|
uses: "actions/setup-java@v2"
|
|
with:
|
|
distribution: "adopt"
|
|
java-version: "${{ matrix.java }}"
|
|
- name: "Cache Gradle"
|
|
uses: "actions/cache@v2.1.4"
|
|
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.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.4"
|
|
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"
|
|
run: "java -jar BuildTools.jar --rev 1.16.5"
|
|
- name: "Clean Build"
|
|
run: "./gradlew clean build 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
|
|
|
|
|