9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00

[ci-skip] update .github dir

This commit is contained in:
NONPLAYT
2025-04-27 14:06:50 +03:00
parent 4cde401243
commit 2c364c71c9
10 changed files with 273 additions and 85 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1,2 +0,0 @@
* @BX-Team/bx-team-maintainers
/.github/CODEOWNERS @BX-Team/bx-team-maintainers

View File

@@ -1,65 +1,64 @@
name: Bug Report name: Bug report
description: File a bug report description: Create a report to help us improve
labels: bug, not confirmed labels: ["bug"]
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Before reporting a crash here, please make sure you are on the latest version of DivineMC. Before reporting an issue, make sure you are running the latest build of DivineMC and checked for duplicate issues in [Issues](https://github.com/BX-Team/DivineMC/issues)!
- type: textarea
attributes:
label: Expected behavior
description: What you expected to see.
validations:
required: true
- type: textarea
attributes:
label: Observed/Actual behavior
description: What you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Steps/models to reproduce
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
validations:
required: true
- type: textarea
attributes:
label: DivineMC version
description: |
Run `/version` on your server and **paste** the full, unmodified output here.
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
<details>
<summary>Example</summary>
```
> version
[17:22:05] [Thread-6/INFO]: Checking version, please wait...
[17:22:07] [Thread-6/INFO]: This server is running DivineMC version git-DivineMC-"060a5e8" (MC: 1.19.3) (Implementing API version Unknown-Version) (Git: 060a5e8 on ver/1.19.3)
[17:22:07] [Thread-6/INFO]: You are running 2 versions beyond. Please update your server when possible to maintain stability, security, and receive the latest optimizations.
```
</details>
validations:
required: true
- type: checkboxes - type: checkboxes
attributes: attributes:
label: Agreements label: Checklist
description: Please agree to the following. description: |
Before you scroll down, select boxes below.
options: options:
- label: I am running the latest version of DivineMC from [here](https://github.com/BX-Team/DivineMC/releases/latest). - label: I have searched the existing issues and the documentation
required: true required: true
- label: I have searched for and ensured there isn't already an open issue regarding this. - label: I ticked all the boxes without actually reading them
required: false
- label: I am using latest DivineMC build from https://github.com/BX-Team/DivineMC/releases
required: true required: true
- label: My version of Minecraft is supported by DivineMC. - label: I tested and couldn't replicate this issue on [latest Purpur build](https://purpurmc.org/)
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: Other label: What behaviour is observed?
description: | description: A clear and concise description of what the behavior is.
Please include other helpful information below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations: validations:
required: false required: true
- type: textarea
attributes:
label: What is the expected behavior?
description: A clear and concise description of what you expected to see.
validations:
required: true
- type: textarea
attributes:
label: How to reproduce?
description: Steps to reproduce this behaviour.
placeholder: |
1. Enter server ...
2. Execute command /example ...
3. Server crashes ...
4. See error
validations:
required: true
- type: input
attributes:
label: Spark profiler link
description: |
Link of spark profiler, which including helpful information helps us to work with your issue,
see https://spark.lucko.me/docs/ to learn how to use spark.
validations:
required: true
- type: input
attributes:
label: Error log (if applicable)
description: If you are reporting a console error, upload any relevant errors or full log to either https://mclo.gs/ or https://pastes.dev/, save and the paste the link in this box.

View File

@@ -0,0 +1,15 @@
name: Feature request
description: Suggest an idea to improve DivineMC
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
We are always looking for ways to improve DivineMC, and your feedback is invaluable to us. Please fill out the form below to help us understand your feature request better.
- type: textarea
attributes:
label: What feature do you want to see added?
description: A clear and concise description of your feature request.
validations:
required: true

82
.github/workflows/auto-update.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
name: Automatically Upstream Purpur
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout DivineMC repository
uses: actions/checkout@main
with:
path: 'DivineMC'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Purpur repository
uses: actions/checkout@main
with:
path: 'Purpur'
repository: "PurpurMC/Purpur"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Purpur latest commit Hash
id: purpurCommit
run: |
cd Purpur
echo "purpurRef=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get Current Purpur commit Hash
id: currPurpurRef
run: |
cd DivineMC
currPurpurRef=$(grep "^purpurRef\s*=" gradle.properties | sed 's/^purpurRef\s*=\s*//')
echo "currPurpurRef=$currPurpurRef" >> $GITHUB_OUTPUT
- name: Update purpurRef in DivineMC
run: |
cd DivineMC
sed -i "s/\(purpurRef\s*=\s*\).*/\1$PURPUR_REF/" gradle.properties
env:
PURPUR_REF: ${{ steps.purpurCommit.outputs.purpurRef }}
- name: Setup Git and Gradle
run: |
cd DivineMC
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
chmod +x gradlew
- name: Setup JDK 21
uses: actions/setup-java@main
with:
distribution: 'temurin'
java-version: '21'
- name: Running tests before push
run: |
cd DivineMC
if ! git diff --quiet; then
echo "Running tests...."
./gradlew applyAllPatches
./gradlew build -x test
./gradlew rebuildPurpurPatches
./gradlew rebuildAllServerPatches
fi
- name: Check for changes and write to repository
run: |
cd DivineMC
if ! git diff --quiet; then
echo "Writing to repo....."
git add .
chmod +x ./scripts/upstreamCommit.sh
./scripts/upstreamCommit.sh $CURR_PURPUR_REF
git push
else
echo "No changes to commit."
fi
env:
CURR_PURPUR_REF: ${{ steps.currPurpurRef.outputs.currPurpurRef }}

View File

@@ -10,42 +10,62 @@ jobs:
build: build:
runs-on: blacksmith-8vcpu-ubuntu-2204 runs-on: blacksmith-8vcpu-ubuntu-2204
if: "!contains(github.event.commits[0].message, '[ci-skip]')" if: "!contains(github.event.commits[0].message, '[ci-skip]')"
env:
BUILD_NUMBER: ${{ github.run_number }}
outputs:
build_number: ${{ env.BUILD_NUMBER }}
steps: steps:
- name: Setup Action - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Gradle - name: Setup Gradle Cache
uses: gradle/actions/setup-gradle@v3 uses: useblacksmith/cache@v5
with: with:
add-job-summary: never path: |
generate-job-summary: false ~/.gradle/caches/modules-2
cache-read-only: false ~/.gradle/caches/jars-*
~/.gradle/caches/transforms-*
~/.gradle/wrapper
~/.gradle/build-cache-*
~/.gradle/configuration-cache-*
.gradle/patchCache
.gradle/patched
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'patches/**/*.patch') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Cache Cleanup
run: |
mkdir -p ~/.gradle/caches/modules-2
[ -f ~/.gradle/caches/modules-2/modules-2.lock ] && rm -f ~/.gradle/caches/modules-2/modules-2.lock
find ~/.gradle/caches -name "*.lock" -type f -delete || echo "No lock files found"
- name: Setup JDK 21 - name: Setup JDK 21
uses: actions/setup-java@v4 uses: useblacksmith/setup-java@v5
with: with:
distribution: temurin distribution: temurin
java-version: 21 java-version: 21
- name: Configure Git and Gradle - name: Configure Git and Gradle
run: | run: |
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions" git config --global user.email "no-reply@github.com"
echo "BUILD_NUMBER=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV git config --global user.name "Github Actions"
git config --global core.preloadindex true
git config --global core.fscache true
git config --global gc.auto 256
chmod +x gradlew chmod +x gradlew
- name: Patch - name: Apply Patches
run: ./gradlew applyAllPatches --stacktrace run: |
PARALLELISM=$(($(nproc) * 2))
./gradlew applyAllPatches --stacktrace --parallel --max-workers=$PARALLELISM --build-cache --no-daemon
- name: Build Paperclip Jar - name: Build Paperclip Jar
run: ./gradlew createMojmapPaperclipJar --stacktrace run: ./gradlew createMojmapPaperclipJar --stacktrace --parallel --no-daemon
- name: Publish API - name: Prepare Release Info
continue-on-error: true
run: ./gradlew publish -PdivinemcUsername=${{ secrets.REPO_USERNAME }} -PdivinemcPassword=${{ secrets.REPO_SECRET }}
- name: Get Release Info
run: bash scripts/releaseInfo.sh run: bash scripts/releaseInfo.sh
env: env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }} BUILD_NUMBER: ${{ env.BUILD_NUMBER }}

View File

@@ -1,37 +1,33 @@
name: DivineMC Test Build name: Build Pull Request
on: on:
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
workflow_dispatch:
jobs: jobs:
build: build:
runs-on: blacksmith-8vcpu-ubuntu-2204 runs-on: blacksmith-8vcpu-ubuntu-2204
steps: steps:
- name: Setup Action - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Setup JDK 21 - name: Setup JDK 21
uses: actions/setup-java@v4 uses: useblacksmith/setup-java@v5
with: with:
distribution: temurin distribution: temurin
java-version: 21 java-version: 21
cache: 'gradle'
- name: Configure Git and Gradle - name: Configure Git and Gradle
run: | run: |
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions" git config --global user.email "no-reply@github.com"
git config --global user.name "Github Actions"
chmod +x gradlew chmod +x gradlew
- name: Patch - name: Apply Patches
run: ./gradlew applyAllPatches --stacktrace run: ./gradlew applyAllPatches --stacktrace --no-daemon
- name: Build Paperclip Jar - name: Build Paperclip Jar
run: ./gradlew createMojmapPaperclipJar --stacktrace run: ./gradlew createMojmapPaperclipJar --stacktrace --no-daemon
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@main uses: actions/upload-artifact@main

44
.github/workflows/publish-api.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Publish API
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Configure Git and Gradle
run: |
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
chmod +x gradlew
- name: Apply patches
run: |
PARALLELISM=$(($(nproc) * 2))
./gradlew applyAllPatches --stacktrace --parallel --max-workers=$PARALLELISM --build-cache --no-daemon
- name: Build
run: ./gradlew build -x test
- name: Publish API
continue-on-error: true
run: |
./gradlew :divinemc-api:publish
./gradlew publishDevBundlePublicationToDivinemcRepository -PpublishDevBundle=true
env:
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_PASSWORD: ${{ secrets.REPO_SECRET }}

View File

@@ -97,7 +97,9 @@ subprojects {
repositories { repositories {
maven("https://repo.bxteam.org/snapshots") { maven("https://repo.bxteam.org/snapshots") {
name = "divinemc" name = "divinemc"
credentials(PasswordCredentials::class)
credentials.username = System.getenv("REPO_USERNAME")
credentials.password = System.getenv("REPO_PASSWORD")
} }
} }
} }

View File

@@ -103,7 +103,14 @@
tasks.jar { tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) { from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}") into("META-INF/maven/${project.group}/${project.name}")
@@ -187,8 +_,8 @@ @@ -180,15 +_,13 @@
val services = objects.newInstance<Services>()
tasks.withType<Javadoc> {
- //(options as StandardJavadocDocletOptions).addStringOption("-add-modules", "jdk.incubator.vector") // Purpur - our javadocs need this for pufferfish's SIMD patch
- (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") // Purpur - silence Paper's bajillion javadoc warnings
val options = options as StandardJavadocDocletOptions
options.overview = "../paper-api/src/main/javadoc/overview.html"
options.use() options.use()
options.isDocFilesSubDirs = true options.isDocFilesSubDirs = true
options.links( options.links(
@@ -123,12 +130,13 @@
) )
options.tags("apiNote:a:API Note:") options.tags("apiNote:a:API Note:")
@@ -226,6 +_,8 @@ @@ -226,6 +_,9 @@
into("build/docs/javadoc") into("build/docs/javadoc")
} }
} }
+ +
+ options.addStringOption("Xdoclint:none", "-quiet") // DivineMC - Hide unnecessary javadoc warnings + options.addStringOption("Xdoclint:none", "-quiet") // DivineMC - Hide unnecessary javadoc warnings
+ options.addStringOption("-add-modules", "jdk.incubator.vector") // DivineMC - Required for simd
} }
tasks.test { tasks.test {

View File

@@ -1,5 +1,21 @@
--- a/purpur-server/build.gradle.kts --- a/purpur-server/build.gradle.kts
+++ b/purpur-server/build.gradle.kts +++ b/purpur-server/build.gradle.kts
@@ -13,6 +_,7 @@
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
+val bxTeamMavenPublicUrl = "https://repo.bxteam.org/snapshots/"
dependencies {
mache("io.papermc:mache:1.21.5+build.1")
@@ -30,6 +_,7 @@
// Purpur start - Rebrand
val purpur = forks.register("purpur") {
+ rootDirectory = upstreamsDirectory().map { it.dir("purpur") }
upstream.patchDir("paperServer") {
upstreamPath = "paper-server"
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
@@ -37,9 +_,27 @@ @@ -37,9 +_,27 @@
outputDir = rootDirectory.dir("paper-server") outputDir = rootDirectory.dir("paper-server")
} }
@@ -29,6 +45,14 @@
spigot { spigot {
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc" buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment
@@ -62,6 +_,7 @@
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
+ bxTeamMavenPublicUrl // DivineMC - Rebrand
)
}
@@ -125,10 +_,18 @@ @@ -125,10 +_,18 @@
main { main {
java { srcDir("../paper-server/src/main/java") } java { srcDir("../paper-server/src/main/java") }