-
Notifications
You must be signed in to change notification settings - Fork 89
138 lines (124 loc) · 5.78 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
workflow_dispatch:
branches: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
name: 'Build'
steps:
- name: Cache Paper(clip) jars
id: cache-paperclip-jars
uses: actions/cache@v2
with:
path: |
.paper-nms
build
paperclip
~/.m2/repository/io/papermc/paper
~/.m2/repository/ca/bkaw/paper-nms
~/.m2/repository/org/spigotmc/spigot
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-paperclip
- name: Download Paperclip jars
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p paperclip
wget https://papermc.io/api/v2/projects/paper/versions/1.14.4/builds/243/downloads/paper-1.14.4-243.jar -O paperclip/paper-1.14.4.jar
wget https://papermc.io/api/v2/projects/paper/versions/1.15.2/builds/391/downloads/paper-1.15.2-391.jar -O paperclip/paper-1.15.2.jar
wget https://papermc.io/api/v2/projects/paper/versions/1.16.1/builds/138/downloads/paper-1.16.1-138.jar -O paperclip/paper-1.16.1.jar
wget https://papermc.io/api/v2/projects/paper/versions/1.16.3/builds/253/downloads/paper-1.16.3-253.jar -O paperclip/paper-1.16.3.jar
wget https://papermc.io/api/v2/projects/paper/versions/1.16.4/builds/416/downloads/paper-1.16.4-416.jar -O paperclip/paper-1.16.4.jar
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Generate 1.14 - 1.16 Paper jars
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
working-directory: paperclip
run: |
java -jar paper-1.14.4.jar
java -jar paper-1.15.2.jar
java -jar paper-1.16.1.jar
java -jar paper-1.16.3.jar
java -jar paper-1.16.4.jar
- name: Install 1.14 - 1.16 Paper jars
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
working-directory: paperclip
run: |
mvn install:install-file -Dfile=cache/patched_1.14.4.jar -DgroupId="io.papermc" -DartifactId="paper" -Dversion="1.14.4-R0.1-SNAPSHOT" -Dpackaging="jar"
mvn install:install-file -Dfile=cache/patched_1.15.2.jar -DgroupId="io.papermc" -DartifactId="paper" -Dversion="1.15.2-R0.1-SNAPSHOT" -Dpackaging="jar"
mvn install:install-file -Dfile=cache/patched_1.16.1.jar -DgroupId="io.papermc" -DartifactId="paper" -Dversion="1.16.1-R0.1-SNAPSHOT" -Dpackaging="jar"
mvn install:install-file -Dfile=cache/patched_1.16.3.jar -DgroupId="io.papermc" -DartifactId="paper" -Dversion="1.16.3-R0.1-SNAPSHOT" -Dpackaging="jar"
mvn install:install-file -Dfile=cache/patched_1.16.4.jar -DgroupId="io.papermc" -DartifactId="paper" -Dversion="1.16.4-R0.1-SNAPSHOT" -Dpackaging="jar"
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- uses: actions/checkout@v2
name: Checkout code
- name: Run paper-nms init
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mvn paper-nms:init -pl nms/1_17_0
mvn paper-nms:init -pl nms/1_17_1
mvn paper-nms:init -pl nms/1_18_0
mvn paper-nms:init -pl nms/1_18_1
mvn paper-nms:init -pl nms/1_18_2
mvn paper-nms:init -pl nms/1_19_0
mvn paper-nms:init -pl nms/1_19_1
mvn paper-nms:init -pl nms/1_19_2
mvn paper-nms:init -pl nms/1_19_3
mvn paper-nms:init -pl nms/1_19_4
mvn paper-nms:init -pl nms/1_20_0
mvn paper-nms:init -pl nms/1_20_1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3-4
- name: 'Run BuildTools 1.20.5-1.20.6, 1.21'
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p build
cd build/
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
git clone https://hub.spigotmc.org/stash/scm/spigot/bukkit.git Bukkit
cd Bukkit
git checkout 304e83eb384c338546aa96eea51388e0e8407e26
cd ..
git clone https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git CraftBukkit
cd CraftBukkit
git checkout 91b1fc3f1cf89e2591367dca1fa7362fe376f289
cd ..
git clone https://hub.spigotmc.org/stash/scm/spigot/spigot.git Spigot
cd Spigot
git checkout b698b49caf14f97a717afd67e13fd7ac59f51089
cd ..
git clone https://hub.spigotmc.org/stash/scm/spigot/builddata.git BuildData
cd BuildData
git checkout a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.4 --remapped --disable-java-check
cd ../
- name: Build with Maven
run: mvn -B package --file pom.xml