From 5e12e07b865f9292048ff35b30f4810db9411fc6 Mon Sep 17 00:00:00 2001 From: JellySquid Date: Thu, 3 Sep 2020 17:51:14 -0500 Subject: [PATCH] change: Formalize the repo a bit more, add build workflows --- .github/FUNDING.yml | 4 +++ .github/workflows/gradle.yml | 23 +++++++++++++++ .github/workflows/publish.yml | 28 ++++++++++++++++++ CONTRIBUTING.md | 54 ++++++++++++++++++++++++++++++++++- README.md | 36 +++++++++++++++++++---- 5 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/gradle.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..1556a62 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: jellysquid3 +patreon: jellysquid diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..c4fc552 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,23 @@ +name: Java CI with Gradle + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: 14 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Upload build artifacts + uses: actions/upload-artifact@v1 + with: + name: build-artifacts + path: build/libs \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a01a6f7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +name: Publish Release v2 + +on: + release: + types: + - published + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Upload assets to CurseForge + run: ./gradlew build + env: + BUILD_RELEASE: ${{ github.event.prerelease == false }} + - name: Upload assets to GitHub + uses: AButler/upload-release-assets@v2.0 + with: + files: 'build/libs/*;LICENSE' + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb7d858..6b31657 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,53 @@ -Suicide Prevention Lifeline: https://suicidepreventionlifeline.org/ (24/7 phone lifeline: 1-800-273-8255) \ No newline at end of file +## Issues + +When opening issues, please be sure to include the following information as applicable. + +- The exact version of the mod you are running, such as `0.1.0-fabric`, and the version of Fabric/Forge you are using. +- If your issue is a crash, attach the latest client or server log and the complete crash report as a file. You can +attach these as a file (preferred) or host them on a service such as [GitHub Gist](https://gist.github.com/) or [Hastebin](https://hastebin.com/). +- If your issue is a bug or otherwise unexpected behavior, explain what you expected to happen. +- If your issue only occurs with other mods installed, be sure to specify the names and versions of those mods. + +## Pull Requests + +It's super awesome to hear you're wishing to contribute to the project! Before you open a pull request, you'll need to +give a quick read to the following guidelines. + +### Contributor License Agreement (CLA) + +By submitting changes to this repository, you are hereby agreeing that: + +- Your contributions will be licensed irrecoverably under the [GNU LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.html). +- Your contributions are of your own work and free of legal restrictions (such as patents and copyrights) or other +issues which would pose issues for inclusion or distribution under the above license. + +If you do not agree to these terms, please do not submit contributions to this repository. If you have any questions +about these terms, feel free to get in contact with me through the [public Discord server](https://jellysquid.me/discord) or +through opening an issue. + +### Code Style + +When contributing source code changes to the project, ensure that you make consistent use of the code style guidelines +used throughout the codebase (which follow pretty closely after the standard Java code style guidelines). These guidelines +have also been packaged as EditorConfig and IDEA inspection profiles which can be found in the repository root and `idea` +directory respectively. + +- Use 4 spaces for indentation, not tabs. Avoid lines which exceed 120 characters. +- Use `this` to qualify member and field access. +- Always use braces when writing if-statements and loops. +- Annotate overriding methods with `@Override` so that breaking changes when updating will create hard compile errors. +- Comment code which needs to mimic vanilla behavior with `[VanillaCopy]` so it can be inspected when updating. + +### Making a Pull Request + +Your pull request should include a brief description of the changes it makes and link to any open issues which it +resolves. You should also ensure that your code is well documented where non-trivial and that it follows the +outlined code style guidelines above. + +If you're adding new Mixin patches to the project, please ensure that you have created appropriate entries to disable +them in the config file. Mixins should always be self-contained and grouped into "patch sets" which are easy to isolate. + +Additionally, if you're making changes for the sake of improving performance in either the vanilla game or the project +itself, try to provide a detailed test-case and benchmark for them. It's understandable that micro-benchmarking is +difficult in the context of Minecraft, but even naive figures taken from a profiler, timings graph, or a simple counter +will be greatly appreciated and help track incremental improvements. \ No newline at end of file diff --git a/README.md b/README.md index 1c8bd59..9194d64 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -Hydrogen -======== +# Hydrogen (for Fabric) +![GitHub license](https://img.shields.io/github/license/jellysquid3/hydrogen-fabric.svg) +![GitHub issues](https://img.shields.io/github/issues/jellysquid3/hydrogen-fabric.svg) +![GitHub tag](https://img.shields.io/github/tag/jellysquid3/hydrogen-fabric.svg) All subjects intending to handle high-energy gamma leaking portal technology must be informed that they MAY be informed of applicable regulatory compliance issues. @@ -11,14 +13,36 @@ No further compliance information is required or will be provided, and you are a I'm not sure yet. This mod works to reduce the memory usage of the game after startup by compacting various data structures (primarily in block state and block model objects.) -In case it wasn't obvious enough, let me also put this in big scary letters. - -:warning: **DO NOT USE THIS IN WORLDS YOU CARE ABOUT.** There may be serious problems. This entire mod was constructed -in one night. +:warning: Hydrogen hasn't received a super extensive amount of testing, but preliminary reports would suggest things are +fairly stable. That isn't a warranty however, and you should **make backups** of your worlds before installing it. As with most things I publish, this repository's existence is not a guarantee that I'll maintain this mod. This mod is an experiment. Please keep that in mind. +### Building from source + +If you're hacking on the code or would like to compile a custom build of Lithium from the latest sources, you'll want +to start here. + +#### Prerequisites + +You will need to install JDK 8 in order to build Lithium. You can either install this through a package manager such as +[Chocolatey](https://chocolatey.org/) on Windows or [SDKMAN!](https://sdkman.io/) on other platforms. If you'd prefer to +not use a package manager, you can always grab the installers or packages directly from +[AdoptOpenJDK](https://adoptopenjdk.net/). + +On Windows, the Oracle JDK/JRE builds should be avoided where possible due to their poor quality. Always prefer using +the open-source builds from AdoptOpenJDK when possible. + +#### Compiling + +Navigate to the directory you've cloned this repository and launch a build with Gradle using `gradlew build` (Windows) +or `./gradlew build` (macOS/Linux). If you are not using the Gradle wrapper, simply replace `gradlew` with `gradle` +or the path to it. + +The initial setup may take a few minutes. After Gradle has finished building everything, you can find the resulting +artifacts in `build/libs`. + ### License Hydrogen is licensed under GNU LGPLv3, a free and open-source license. For more information, please see the