Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-24 15:20:25 +01:00
Update PR Build Action for API (#3535)
* Use API from use making PR if exists * Update CONTRIBUTING.md * Address @Tim203's review * Fix path * Build the api before doing anything with the Geyser repo --------- Co-authored-by: Tim203 <mctim203@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
406dfcb22c
Commit
cfd7aeb927
41
.github/workflows/pullrequest.yml
vendored
41
.github/workflows/pullrequest.yml
vendored
@ -4,21 +4,44 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: 17
|
java-version: 17
|
||||||
cache: 'gradle'
|
distribution: temurin
|
||||||
- name: submodules-init
|
cache: gradle
|
||||||
uses: snickerbockers/submodules-init@v4
|
|
||||||
- name: Build with Gradle
|
- name: Check if the author has forked the API repo
|
||||||
run: ./gradlew build
|
uses: Kas-tle/ForkFinder@v1.0.1
|
||||||
|
id: find_forks
|
||||||
|
with:
|
||||||
|
owner: GeyserMC
|
||||||
|
repo: api
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Use author's API repo if it exists
|
||||||
|
if: steps.find_forks.outputs.target_branch_found == 'true'
|
||||||
|
env:
|
||||||
|
API_FORK_URL: ${{ steps.find_forks.outputs.user_fork_url }}
|
||||||
|
API_FORK_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||||
|
run: |
|
||||||
|
git clone "${API_FORK_URL}" --single-branch --branch "${API_FORK_BRANCH}" api
|
||||||
|
cd api
|
||||||
|
./gradlew publishToMavenLocal
|
||||||
|
|
||||||
|
- name: Checkout repository and submodules
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: geyser
|
||||||
|
|
||||||
|
- name: Build Geyser
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: build
|
||||||
|
build-root-directory: geyser
|
||||||
|
|
||||||
- name: Archive artifacts (Geyser Fabric)
|
- name: Archive artifacts (Geyser Fabric)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -48,4 +48,6 @@ Make sure to comment your code where possible.
|
|||||||
|
|
||||||
The nature of our software requires a lot of arrays and maps to be stored - where possible, use Fastutil's specialized maps. For example, if you're storing block state translations, use an `Int2IntMap`.
|
The nature of our software requires a lot of arrays and maps to be stored - where possible, use Fastutil's specialized maps. For example, if you're storing block state translations, use an `Int2IntMap`.
|
||||||
|
|
||||||
We have a rundown of all the tools you need to develop over on our [wiki](https://github.com/GeyserMC/Geyser/wiki/Developer-Guide). If you have any questions, please feel free to reach out to our [Discord](https://discord.gg/geysermc)!
|
We have a rundown of all the tools you need to develop over on our [wiki](https://wiki.geysermc.org/other/developer-guide/). If you have any questions, please feel free to reach out to our [Discord](https://discord.gg/geysermc)!
|
||||||
|
|
||||||
|
If you're making a pull request that also depends on changes to [the base API](https://github.com/GeyserMC/api), simply fork the API repo and create a branch with the same name as your Geyser PR. The pull request [action](https://github.com/GeyserMC/Geyser/blob/master/.github/workflows/pullrequest.yml) will automatically use your API changes while building your changes to Geyser.
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren