-
Notifications
You must be signed in to change notification settings - Fork 21
81 lines (76 loc) · 2.74 KB
/
run-specific-all-modloaders.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
name: Run MC on all modloaders
on:
workflow_dispatch:
inputs:
mc:
description: 'The MC version to to use'
required: true
default: '1.20.4'
java:
description: 'The Java version to use'
required: true
default: '17'
xvfb:
description: 'Runs the game with Xvfb, if false, you should probably use the -lwjgl option in headlessmc.'
required: false
default: 'false'
type: string
headlessmc-command:
description: 'Arguments for the headlessmc command.'
required: false
default: '-lwjgl --jvm -Djava.awt.headless=true'
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew build
- name: Delete dev jar
run: rm headlessmc-launcher-wrapper/build/libs/headlessmc-launcher-*-dev.jar
- name: Delete javadoc jar
run: rm headlessmc-launcher-wrapper/build/libs/headlessmc-launcher-*-javadoc.jar
- name: Delete sources jar
run: rm headlessmc-launcher-wrapper/build/libs/headlessmc-launcher-*-sources.jar
- name: Rename launcher jar
run: mv headlessmc-launcher-wrapper/build/libs/headlessmc-launcher-*.jar headlessmc-launcher-wrapper/build/libs/headlessmc-launcher.jar
- name: Copy launcher jar
run: cp headlessmc-launcher-wrapper/build/libs/headlessmc-launcher.jar .
- name: Upload Launcher Jar
uses: actions/upload-artifact@v4
with:
name: launcher-jar
path: ./headlessmc-launcher.jar
run:
strategy:
matrix:
version:
- { type: lexforge, modloader: forge, regex: .*forge.* }
- { type: neoforge, modloader: neoforge, regex: .*neoforge.* }
- { type: fabric, modloader: fabric, regex: .*fabric.* }
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Copy launcher jar
run: cp launcher-jar/headlessmc-launcher.jar .
- name: Run the MC client
uses: 3arthqu4ke/mc-runtime-test@2.3.1
with:
mc: ${{ github.event.inputs.mc }}
modloader: ${{ matrix.version.modloader }}
regex: ${{ matrix.version.regex }}
java: ${{ github.event.inputs.java }}
mc-runtime-test: ${{ matrix.version.type }}
xvfb: ${{ github.event.inputs.xvfb }}
headlessmc-command: ${{ github.event.inputs.headlessmc-command }}
download-hmc: false