Try to fix CI

CI part 2
Update Action-SpigotMC
Create compileSpigotVersions.sh
CI p3
ci p4
ci p5
ci p6
ci p7
ci p8
Auto stash before merge of "master" and "origin/master"
ci p9


ci p10
ci p11
This commit is contained in:
SeanOMik 2022-02-19 13:18:59 -05:00
parent 2b37feec07
commit 58fe853459
3 changed files with 134 additions and 24 deletions

View File

@ -20,37 +20,69 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@2.1.1
- name: Download OpenJDK 16
run: wget -O $RUNNER_TEMP/java_package.tar.gz https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16u-2021-05-08-12-45/OpenJDK16U-jdk_x64_linux_hotspot_2021-05-08-12-45.tar.gz
- name: Set up JDK 16
uses: joschi/setup-jdk@v2
- name: Cache Build tools directory
uses: actions/cache@v2
with:
java-version: '16'
architecture: 'x64'
#- name: Compile Spigot
# uses: SeanOMik/Action-SpigotMC@b23370e6a4c3e9cdd38b8d5bcd4a543f8c1e1c19
path: ~/buildtools
key: ${{ runner.os }}-spigot-${{ hashFiles('compileSpigotVersions.sh') }}
restore-keys: ${{ runner.os }}-spigot
- name: maven-settings-action
uses: s4u/maven-settings-action@v2.5.0
with:
servers: |
[{
"id": "seanomik-maven-spigot-private",
"username": "${{ secrets.MAVEN_SPIGOT_REPO_USER }}",
"password": "${{ secrets.MAVEN_SPIGOT_REPO_SECRET }}"
}]
- name: Install OpenJDK 8
uses: actions/setup-java@v2
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
#- name: Download buildtools
# run: |
# mkdir ~/buildtools
# cd ~/buildtools
# wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
#- name: Compile 1.14.4, 1.15, 1.16.1, 1.16.3, 1.16.5 Spigot
# run: |
# cd ~/buildtools
# java -jar ./BuildTools.jar --rev 1.14.4
# java -jar ./BuildTools.jar --rev 1.15
# java -jar ./BuildTools.jar --rev 1.16.1
# java -jar ./BuildTools.jar --rev 1.16.3
# java -jar ./BuildTools.jar --rev 1.16.5
#- name: Install OpenJDK 16
# uses: actions/setup-java@v2
# with:
# versions: 1.14,1.15,1.16.1,1.16.3,1.16.5,1.17
# threads: -1
# remapped: remapped-mojang
- name: Compile Remapped Mojang Spigot
uses: SeanOMik/Action-SpigotMC@b23370e6a4c3e9cdd38b8d5bcd4a543f8c1e1c19
# distribution: 'temurin' # See 'Supported distributions' for available options
# java-version: '16'
#- name: Compile 1.17, 1.17.1 Moajng Remapped Spigot
# run: |
# cd ~/buildtools
# java -jar ./BuildTools.jar --rev 1.17 --remapped remapped-mojang
# java -jar ./BuildTools.jar --rev 1.17.1 --remapped remapped-mojang
- name: Install OpenJDK 17
uses: actions/setup-java@v2
with:
versions: 1.17
threads: -1
remapped: remapped-mojang
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
#- name: Compile 1.18, 1.18.1 Moajng Remapped Spigot
# run: |
# cd ~/buildtools
# java -jar ./BuildTools.jar --rev 1.18 --remapped remapped-mojang
# java -jar ./BuildTools.jar --rev 1.18.1 --remapped remapped-mojang
- name: Debug - java version
run: |
java -version
- name: Install with Maven
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/16.0.1-9/x64
run: |
sudo mvn install
#- name: Install with Maven
# env:
# JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/16.0.1-9/x64
# run: |
# sudo mvn install
- name: Build with Maven
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/16.0.1-9/x64
run: |
sudo mvn package
sudo mvn -f ./ci-pom.xml package

69
ci-pom.xml Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.3-SNAPSHOT</version>
<packaging>pom</packaging>
<repositories>
<repository>
<id>seanomik-maven-spigot-private</id>
<name>SeanOMik Maven Repository</name>
<url>https://maven.seanomik.net/spigot-private</url>
</repository>
</repositories>
<modules>
<module>Plugin</module>
<module>Utility</module>
<module>1_18_1_R1</module>
<module>1_18_R1</module>
<module>1_17_1_R1</module>
<module>1_17_R1</module>
<module>1_16_R3</module>
<module>1_16_R2</module>
<module>1_16_R1</module>
<module>1_15_R1</module>
<module>1_14_R1</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

9
compileSpigotVersions.sh Normal file
View File

@ -0,0 +1,9 @@
java -jar ./BuildTools.jar --rev 1.14.4 --compile-if-changed
java -jar ./BuildTools.jar --rev 1.15 --compile-if-changed
java -jar ./BuildTools.jar --rev 1.16.1 --compile-if-changed
java -jar ./BuildTools.jar --rev 1.16.3 --compile-if-changed
java -jar ./BuildTools.jar --rev 1.16.5 --compile-if-changed
java -jar ./BuildTools.jar --rev 1.17 --remapped remapped-mojang --compile-if-changed
java -jar ./BuildTools.jar --rev 1.17.1 --remapped remapped-mojang --compile-if-changed
java -jar ./BuildTools.jar --rev 1.18 --remapped remapped-mojang --compile-if-changed
java -jar ./BuildTools.jar --rev 1.18.1 --remapped remapped-mojang --compile-if-changed