-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
956f1eb
commit 1de4a11
Showing
5 changed files
with
239 additions
and
0 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,46 @@ | ||
name: Data Generation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
datagen: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build | ||
run: ./gradlew :spatial-neoforge:build | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Store Compiled | ||
if: success() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: spatial/build | ||
|
||
- name: Store Compiled | ||
if: success() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-neo | ||
path: spatial-neoforge/build |
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,48 @@ | ||
# REQUIRES DATAGEN TO BE CALLED IN A JOB BEFORE THIS!! | ||
|
||
name: Publish | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
publish: | ||
name: Publish Code as Github Package - ${{ inputs.version }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Pull Compilation Data | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: spatial/build | ||
|
||
- name: Pull Compilation Data (Main) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-neo | ||
path: spatial-neoforge/build | ||
|
||
- name: Publish | ||
run: ./gradlew :spatial:publish | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,64 @@ | ||
name: Run Game Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
|
||
env: | ||
VERSION: ${{ inputs.version }} | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
run-tests: | ||
name: Run Game Tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Pull Compilation Data | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: spatial/build | ||
|
||
- name: Pull Compilation Data (Main) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-neo | ||
path: spatial-neoforge/build | ||
|
||
- name: Run Game Tests | ||
run: ./gradlew :spatial-neoforge:runGameTestServer | ||
|
||
- name: Upload test failure | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-data | ||
path: run/gametest | ||
|
||
- name: Run JUnit Tests | ||
run: ./gradlew :spatial-neoforge:test | ||
|
||
- name: Upload test reports on failure | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-reports | ||
path: spatial-neoforge/build/reports |
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,57 @@ | ||
name: Publish and Announce Nightly Build | ||
|
||
env: | ||
GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- "README.md" | ||
- "LICENSE" | ||
- ".github/**/*" | ||
- "**/*.gradle.kts" | ||
- "**/gradle.properties" | ||
|
||
jobs: | ||
vars: | ||
name: Get Variables | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
version: ${{steps.version.outputs.version}} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 150 | ||
fetch-tags: true | ||
|
||
- name: Version | ||
id: version | ||
uses: paulhatch/[email protected] | ||
with: | ||
change_path: "spatial" | ||
version_format: "${major}.${minor}.${patch}" | ||
search_commit_body: true | ||
|
||
build: | ||
needs: [ vars ] | ||
uses: ./.github/workflows/_build.yml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.vars.outputs.version }} | ||
|
||
tests: | ||
needs: [ build, vars ] | ||
uses: ./.github/workflows/_run-gametests.yml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.vars.outputs.version }} | ||
|
||
publish: | ||
needs: [ vars, tests ] | ||
uses: ./.github/workflows/_publish.yml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.vars.outputs.version }} |
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