2020-08-01 18:14:57 +02:00
|
|
|
name: Yatopia Build Script
|
2020-02-26 17:29:12 +01:00
|
|
|
|
2020-07-18 16:16:33 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2020-10-30 19:41:56 +01:00
|
|
|
- 'Jenkinsfile'
|
2020-07-18 16:27:44 +02:00
|
|
|
branches:
|
2021-01-16 07:42:04 +01:00
|
|
|
- ver/1.16.5
|
2021-04-08 19:38:18 +02:00
|
|
|
- dev/*
|
|
|
|
- staging/1.16.5
|
2020-07-18 16:16:33 +02:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2020-10-30 19:41:56 +01:00
|
|
|
- 'Jenkinsfile'
|
2021-01-24 05:30:54 +01:00
|
|
|
|
2020-02-26 17:29:12 +01:00
|
|
|
jobs:
|
2021-04-27 16:45:57 +02:00
|
|
|
validation:
|
|
|
|
name: "Gradle Wrapper Validation"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
2020-02-26 17:29:12 +01:00
|
|
|
build:
|
2021-04-27 16:45:57 +02:00
|
|
|
needs: validation
|
2020-02-26 17:29:12 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-23 13:21:39 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-04-27 18:17:26 +02:00
|
|
|
java: [ '8', '11', '15', '16' ]
|
2020-10-25 04:28:42 +01:00
|
|
|
fail-fast: false
|
2020-02-26 17:29:12 +01:00
|
|
|
steps:
|
2020-07-18 18:57:55 +02:00
|
|
|
- uses: actions/checkout@v2
|
2021-04-27 16:45:57 +02:00
|
|
|
- name: Set up JDK ${{ matrix.Java }}
|
|
|
|
uses: actions/setup-java@v2
|
2020-03-21 17:32:08 +01:00
|
|
|
with:
|
2021-04-27 16:45:57 +02:00
|
|
|
distribution: 'adopt'
|
2020-05-23 13:21:39 +02:00
|
|
|
java-version: ${{ matrix.java }}
|
2021-01-21 11:58:52 +01:00
|
|
|
|
|
|
|
- name: Pull Gradle Cache
|
2020-07-18 18:03:26 +02:00
|
|
|
uses: actions/cache@v2
|
2021-01-21 11:58:52 +01:00
|
|
|
id: gradle-cache
|
2020-07-11 22:31:40 +02:00
|
|
|
with:
|
2021-01-21 11:58:52 +01:00
|
|
|
path: ~/.gradle
|
2021-04-27 16:45:57 +02:00
|
|
|
key: ${{ runner.os }}-mavenCache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-openjdk-${{ matrix.java }}
|
2021-01-21 11:58:52 +01:00
|
|
|
|
2020-08-01 18:14:57 +02:00
|
|
|
- name: Setup Yatopia Project
|
2020-07-15 22:06:37 +02:00
|
|
|
run: |
|
|
|
|
git config --global user.email "ci@github.com"
|
|
|
|
git config --global user.name "Github CI"
|
2021-01-21 11:58:52 +01:00
|
|
|
git config --global gc.auto 0
|
|
|
|
sudo chmod -R -f 777 ./gradlew
|
|
|
|
./gradlew initGitSubmodules
|
|
|
|
|
2020-10-25 04:28:42 +01:00
|
|
|
- name: Get MC Version
|
2021-01-21 11:58:52 +01:00
|
|
|
run: echo "::set-output name=mcver::$(cat "Paper/work/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)"
|
2020-10-25 04:28:42 +01:00
|
|
|
id: mcver
|
2021-01-21 11:58:52 +01:00
|
|
|
|
2020-10-25 04:28:42 +01:00
|
|
|
- name: Pull Minecraft Decompile Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: decompile-cache
|
|
|
|
with:
|
2021-01-21 11:58:52 +01:00
|
|
|
path: Paper/work/Minecraft/${{ steps.mcver.outputs.mcver }}
|
2021-04-27 16:45:57 +02:00
|
|
|
key: ${{ hashFiles('Paper/work/BuildData/mappings/bukkit-$STEPS_MCVER_OUTPUTS_MCVER-cl.csrg') }}-${{ steps.mcver.outputs.mcver }}-${{ runner.os }}-openjdk-${{ matrix.java }}-minecraft-decomp
|
2021-01-21 11:58:52 +01:00
|
|
|
|
|
|
|
- name: Apply Patches
|
|
|
|
run: |
|
|
|
|
./gradlew setupUpstream
|
|
|
|
./gradlew applyPatches
|
|
|
|
|
|
|
|
- name: Pull Maven Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: maven-cache
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
2021-04-27 16:45:57 +02:00
|
|
|
key: ${{ runner.os }}-mavenCache-${{ hashFiles('**/pom.xml') }}
|
2021-01-21 11:58:52 +01:00
|
|
|
|
2020-08-01 18:14:57 +02:00
|
|
|
- name: Build Yatopia
|
2020-02-26 17:29:12 +01:00
|
|
|
run: |
|
2021-03-16 23:25:29 +01:00
|
|
|
./gradlew clean build paperclip
|
2021-01-21 11:58:52 +01:00
|
|
|
|
2020-09-20 07:42:29 +02:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Yatopia-${{ matrix.java }}
|
2021-04-27 16:45:57 +02:00
|
|
|
path: yatopia-${{ steps.mcver.outputs.mcver }}-paperclip.jar
|
2020-09-20 07:42:29 +02:00
|
|
|
|