Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
change: Formalize the repo a bit more, add build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jellysquid3 committed Sep 3, 2020
1 parent 9c8ea97 commit 5e12e07
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: jellysquid3
patreon: jellysquid
23 changes: 23 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
files: 'build/libs/*;LICENSE'
repo-token: ${{ secrets.GITHUB_TOKEN }}
54 changes: 53 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
Suicide Prevention Lifeline: https://suicidepreventionlifeline.org/ (24/7 phone lifeline: 1-800-273-8255)
## 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.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 5e12e07

Please sign in to comment.