Skip to content

Commit 87db039

Browse files
committed
Merge branch 'mc21.1/2.0'
2 parents 0a67916 + 1de4a11 commit 87db039

Some content is hidden

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

44 files changed

+1304
-470
lines changed

.github/workflows/_build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Data Generation
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
datagen:
12+
name: Build
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up JDK
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: temurin
22+
java-version: 21
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Build
28+
run: ./gradlew :spatial-neoforge:build
29+
env:
30+
VERSION: ${{ inputs.version }}
31+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Store Compiled
35+
if: success()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: build
39+
path: spatial/build
40+
41+
- name: Store Compiled
42+
if: success()
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: build-neo
46+
path: spatial-neoforge/build

.github/workflows/_publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# REQUIRES DATAGEN TO BE CALLED IN A JOB BEFORE THIS!!
2+
3+
name: Publish
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
version:
9+
required: true
10+
type: string
11+
12+
jobs:
13+
publish:
14+
name: Publish Code as Github Package - ${{ inputs.version }}
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: true
21+
22+
- name: Set up JDK
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: temurin
26+
java-version: 21
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@v4
30+
31+
- name: Pull Compilation Data
32+
uses: actions/download-artifact@v4
33+
with:
34+
name: build
35+
path: spatial/build
36+
37+
- name: Pull Compilation Data (Main)
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: build-neo
41+
path: spatial-neoforge/build
42+
43+
- name: Publish
44+
run: ./gradlew :spatial:publish
45+
env:
46+
VERSION: ${{ inputs.version }}
47+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Run Game Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
10+
env:
11+
VERSION: ${{ inputs.version }}
12+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
15+
jobs:
16+
run-tests:
17+
name: Run Game Tests
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
25+
- name: Set up JDK
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: temurin
29+
java-version: 21
30+
31+
- name: Setup Gradle
32+
uses: gradle/actions/setup-gradle@v4
33+
34+
- name: Pull Compilation Data
35+
uses: actions/download-artifact@v4
36+
with:
37+
name: build
38+
path: spatial/build
39+
40+
- name: Pull Compilation Data (Main)
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: build-neo
44+
path: spatial-neoforge/build
45+
46+
- name: Run Game Tests
47+
run: ./gradlew :spatial-neoforge:runGameTestServer
48+
49+
- name: Upload test failure
50+
if: failure()
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: test-data
54+
path: run/gametest
55+
56+
- name: Run JUnit Tests
57+
run: ./gradlew :spatial-neoforge:test
58+
59+
- name: Upload test reports on failure
60+
if: failure()
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: test-reports
64+
path: spatial-neoforge/build/reports
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish and Announce Nightly Build
2+
3+
env:
4+
GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}"
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
paths-ignore:
10+
- "README.md"
11+
- "LICENSE"
12+
- ".github/**/*"
13+
- "**/*.gradle.kts"
14+
- "**/gradle.properties"
15+
16+
jobs:
17+
vars:
18+
name: Get Variables
19+
runs-on: ubuntu-22.04
20+
outputs:
21+
version: ${{steps.version.outputs.version}}
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 150
28+
fetch-tags: true
29+
30+
- name: Version
31+
id: version
32+
uses: paulhatch/[email protected]
33+
with:
34+
change_path: "spatial"
35+
version_format: "${major}.${minor}.${patch}"
36+
search_commit_body: true
37+
38+
build:
39+
needs: [ vars ]
40+
uses: ./.github/workflows/_build.yml
41+
secrets: inherit
42+
with:
43+
version: ${{ needs.vars.outputs.version }}
44+
45+
tests:
46+
needs: [ build, vars ]
47+
uses: ./.github/workflows/_run-gametests.yml
48+
secrets: inherit
49+
with:
50+
version: ${{ needs.vars.outputs.version }}
51+
52+
publish:
53+
needs: [ vars, tests ]
54+
uses: ./.github/workflows/_publish.yml
55+
secrets: inherit
56+
with:
57+
version: ${{ needs.vars.outputs.version }}

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ bin/
4040

4141
### Mac OS ###
4242
.DS_Store
43-
runs/
43+
spatial/runs/
4444

4545
run/
4646

4747
logs/
48+
49+
spatial-neoforge/runs/
50+
51+
.idea/

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/discord.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)