Skip to content

Commit 576dfe1

Browse files
Merge branch 'main' into fix-media-cube-docs
2 parents 580a867 + 871f938 commit 576dfe1

File tree

256 files changed

+4287
-1656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+4287
-1656
lines changed

.github/workflows/pr.yml

Lines changed: 98 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ name: Build pull request
55

66
on:
77
pull_request:
8+
merge_group:
89
workflow_dispatch:
910
# trigger on pushes to the default branch (main) to keep the cache up to date
1011
push:
1112
branches: main
1213

1314
env:
14-
JAVA_VERSION: '17.0.1'
15+
JAVA_VERSION: 17
1516

1617
jobs:
1718
build:
@@ -24,7 +25,7 @@ jobs:
2425
with:
2526
distribution: temurin
2627
java-version: ${{ env.JAVA_VERSION }}
27-
- uses: gradle/actions/setup-gradle@v3
28+
- uses: gradle/actions/setup-gradle@v4
2829

2930
- name: Build
3031
run: |
@@ -43,6 +44,100 @@ jobs:
4344
path: dist
4445
retention-days: 30
4546

47+
test:
48+
needs: build
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
env:
53+
- server
54+
- client
55+
modloader:
56+
- fabric
57+
- forge
58+
include:
59+
- modloader: fabric
60+
mc-runtime-test: fabric
61+
fabric-api: 0.87.0
62+
dependencies: >-
63+
'https://cdn.modrinth.com/data/Ha28R6CL/versions/vlhvI5Li/fabric-language-kotlin-1.10.18%2Bkotlin.1.9.22.jar'
64+
'https://cdn.modrinth.com/data/9s6osm5g/versions/s7VTKfLA/cloth-config-11.1.106-fabric.jar'
65+
'https://cdn.modrinth.com/data/TZo2wHFe/versions/dabyDTwJ/paucal-0.6.0%2B1.20.1-fabric.jar'
66+
'https://cdn.modrinth.com/data/fin1PX4m/versions/fBoxabC2/inline-fabric-1.20.1-1.0.1.jar'
67+
'https://cdn.modrinth.com/data/K01OU20C/versions/HykM2Qyv/cardinal-components-api-5.2.1.jar'
68+
'https://cdn.modrinth.com/data/nU0bVIaL/versions/Y6tuH1cn/Patchouli-1.20.1-84-FABRIC.jar'
69+
'https://cdn.modrinth.com/data/mOgUt4GM/versions/zv46i3PW/modmenu-7.1.0.jar'
70+
'https://cdn.modrinth.com/data/5aaWibi9/versions/z8ProfKL/trinkets-3.7.0.jar'
71+
- modloader: forge
72+
mc-runtime-test: lexforge
73+
fabric-api: none
74+
dependencies: >-
75+
'https://cdn.modrinth.com/data/ordsPcFz/versions/9j6YaPp2/kotlinforforge-4.10.0-all.jar'
76+
'https://cdn.modrinth.com/data/9s6osm5g/versions/JoLgnJ0G/cloth-config-11.1.106-forge.jar'
77+
'https://cdn.modrinth.com/data/TZo2wHFe/versions/HyBiJPtT/paucal-0.6.0%2B1.20.1-forge.jar'
78+
'https://cdn.modrinth.com/data/fin1PX4m/versions/huiPd6Lc/inline-forge-1.20.1-1.0.1.jar'
79+
'https://cdn.modrinth.com/data/40FYwb4z/versions/fs9CeXYZ/caelus-forge-3.1.0%2B1.20.jar'
80+
'https://cdn.modrinth.com/data/nU0bVIaL/versions/JMtc0mTS/Patchouli-1.20.1-84-FORGE.jar'
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/setup-java@v4
84+
with:
85+
distribution: temurin
86+
java-version: ${{ env.JAVA_VERSION }}
87+
88+
- name: Create cache key
89+
run: |
90+
cat <<END_OF_FILE > dependencies.txt
91+
${{ matrix.dependencies }}
92+
END_OF_FILE
93+
94+
- name: Cache dependencies
95+
id: cache
96+
uses: actions/cache@v4
97+
with:
98+
path: run/mods
99+
key: ${{ hashFiles('dependencies.txt') }}
100+
101+
- name: Download dependencies
102+
if: steps.cache.outputs.cache-hit != 'true'
103+
run: |
104+
for url in ${{ matrix.dependencies }}; do
105+
wget --directory-prefix=run/mods/ "$url"
106+
done
107+
108+
- name: Download build artifacts
109+
uses: actions/download-artifact@v4
110+
with:
111+
name: mod-build
112+
path: dist
113+
114+
- name: Prepare mod jar
115+
run: |
116+
rm -f dist/*-javadoc.jar dist/*-sources.jar
117+
cp dist/hexcasting-${{ matrix.modloader }}-*.jar run/mods
118+
119+
- name: Run MC test client
120+
if: matrix.env == 'client'
121+
timeout-minutes: 10
122+
uses: headlesshq/[email protected]
123+
with:
124+
java: ${{ env.JAVA_VERSION }}
125+
mc: 1.20.1
126+
modloader: ${{ matrix.modloader }}
127+
regex: '.*${{ matrix.modloader }}.*'
128+
fabric-api: ${{ matrix.fabric-api }}
129+
mc-runtime-test: ${{ matrix.mc-runtime-test }}
130+
131+
- name: Run MC test server
132+
if: matrix.env == 'server'
133+
timeout-minutes: 10
134+
uses: headlesshq/[email protected]
135+
with:
136+
java: ${{ env.JAVA_VERSION }}
137+
mc: 1.20.1
138+
modloader: ${{ matrix.modloader }}
139+
fabric-api: ${{ matrix.fabric-api }}
140+
46141
datagen:
47142
runs-on: ubuntu-latest
48143
steps:
@@ -53,7 +148,7 @@ jobs:
53148
with:
54149
distribution: temurin
55150
java-version: ${{ env.JAVA_VERSION }}
56-
- uses: gradle/actions/setup-gradle@v3
151+
- uses: gradle/actions/setup-gradle@v4
57152

58153
# ForgeGradle datagen asset download often fails (see #692)
59154
# so just allow it to automatically retry a few times

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# datagen cache
2+
.cache/
3+
14
# hexdoc
25
doc/**/_export/generated/
36
/_site/

0 commit comments

Comments
 (0)