-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: 1.12.2 Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "ci-test-1.12" | ||
|
||
env: | ||
WORLDMAP_VERSION: "1.38.8" | ||
MINIMAP_VERSION: "24.3.0" | ||
MINECRAFT_VERSION: "1.12.2" | ||
MINECRAFT_VERSION_SHORT: "1.12" | ||
MOD_LOADER: "Forge" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Gradle Wrapper Verification | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
|
||
- name: Elevate wrapper permissions | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build mod | ||
run: ./gradlew build | ||
|
||
- name: Rename built mod | ||
run: mv build/libs/xaeroplus-${{ env.MINECRAFT_VERSION }}.jar XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }} | ||
path: XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | ||
|
||
- name: Set CI Test Env Var | ||
run: echo "XP_CI_TEST=true" >> $GITHUB_ENV | ||
|
||
- name: Setup Forge Test | ||
run: | | ||
mkdir -p run/mods && cp XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar run/mods \ | ||
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-minimap/${{ env.MINIMAP_VERSION }}_Forge_1.12/xaeros-minimap-${{ env.MINIMAP_VERSION }}_Forge_1.12.jar -P run/mods/ \ | ||
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-world-map/${{ env.WORLDMAP_VERSION }}_Forge_1.12/xaeros-world-map-${{ env.WORLDMAP_VERSION }}_Forge_1.12.jar -P run/mods/ | ||
- name: Forge Test | ||
uses: 3arthqu4ke/mc-runtime-test@2.3.1 | ||
with: | ||
mc: ${{ env.MINECRAFT_VERSION }} | ||
modloader: forge | ||
regex: .*forge.* | ||
mc-runtime-test: lexforge | ||
java: 8 | ||
xvfb: false | ||
headlessmc-command: -lwjgl --jvm -Djava.awt.headless=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package xaeroplus.util; | ||
|
||
import xaero.common.gui.GuiWaypoints; | ||
import xaero.map.gui.GuiMap; | ||
import xaeroplus.XaeroPlus; | ||
|
||
public class XaeroPlusGameTest { | ||
public static void applyMixinsTest() { | ||
// forcing our mixins to apply by loading some classes that aren't loaded by just joining the game | ||
try { | ||
// todo: ideally we would iterate over every XP mixin class target and load them all | ||
// not sure how to get a list of all mixin targets though | ||
String a = GuiMap.class.getSimpleName(); | ||
String b = GuiWaypoints.class.getSimpleName(); | ||
XaeroPlus.LOGGER.info("Classload test complete"); | ||
} catch (final Throwable e) { | ||
XaeroPlus.LOGGER.error("Classload test failed", e); | ||
System.exit(1); | ||
} | ||
} | ||
} |