mirror of
https://github.com/CCBlueX/LiquidBounce.git
synced 2025-09-06 09:46:38 +00:00

Improves ScriptAPI by enabling GraalJS JIT while addressing Minecraft's obfuscation. Previously, non-JIT mode allowed remapping; however, this new approach applies a call target remapping strategy, overcoming bugs with overloaded names. Also, GraalVM is now the default JDK on LiquidLauncher. --------- Co-authored-by: Senk Ju <18741573+SenkJu@users.noreply.github.com>
79 lines
2.8 KiB
YAML
79 lines
2.8 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ nextgen ]
|
|
pull_request:
|
|
branches: [ nextgen ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/nextgen'
|
|
steps:
|
|
- name: Checkout repository and submodules
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setting up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'graalvm'
|
|
java-version: '21'
|
|
|
|
- name: Grant permissions to src-theme
|
|
run: sudo chmod -R 777 src-theme
|
|
|
|
- name: Setup and build
|
|
uses: gradle/gradle-build-action@v3
|
|
env:
|
|
CI: true
|
|
with:
|
|
arguments: genSources build -x test -x detekt
|
|
|
|
- name: Upload artifact
|
|
run: |
|
|
function gradleprop {
|
|
grep "^${1}=" gradle.properties | cut -d'=' -f2
|
|
}
|
|
export LB_VERSION=$(gradleprop 'mod_version')
|
|
export MINECRAFT_VERSION=$(gradleprop 'minecraft_version')
|
|
export LOADER_VERSION=$(gradleprop 'loader_version')
|
|
export FABRICAPI_VERSION=$(gradleprop 'fabric_version')
|
|
export KOTLIN_VERSION=$(gradleprop 'kotlin_version')
|
|
export FABRIC_KOTLIN_VERSION=$(gradleprop 'fabric_kotlin_version')
|
|
echo Version: $LB_VERSION, Minecraft: $MINECRAFT_VERSION
|
|
cd build/libs
|
|
export JAR=$(find . -regex '.*liquidbounce-[0-9|.]*\.jar')
|
|
cp $JAR zip/liquidbounce.jar
|
|
cd zip
|
|
zip -r liquidbounce.zip *
|
|
md5sum liquidbounce.zip
|
|
curl --connect-timeout 30 -m 300 -X POST -F "artifact=@liquidbounce.zip" -H "Authorization: ${{ secrets.NIGHTLY_PASS }}" -F "gh_id=${{ github.event.head_commit.id }}" -F "gh_ref=${{ github.ref }}" -F "gh_message=${{ github.event.head_commit.message }}" -F "gh_timestamp=${{ github.event.head_commit.timestamp }}" -F "lb_version=$LB_VERSION" -F "mc_version=$MINECRAFT_VERSION" -F "subsystem=fabric" -F "jre_version=21" -F "jre_distribution=graalvm" -F "fabric_loader_version=$LOADER_VERSION" -F "fabric_api_version=$FABRICAPI_VERSION" -F "kotlin_version=$KOTLIN_VERSION" -F "fabric_kotlin_version=$FABRIC_KOTLIN_VERSION" https://api.liquidbounce.net/api/v1/version/new
|
|
|
|
verify-pr:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/nextgen'
|
|
steps:
|
|
- name: Checkout repository and submodules
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setting up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'graalvm'
|
|
java-version: '21'
|
|
|
|
- name: Grant permissions to src-theme
|
|
run: sudo chmod -R 777 src-theme
|
|
|
|
- name: Setup and build
|
|
uses: gradle/gradle-build-action@v3
|
|
env:
|
|
CI: true
|
|
with:
|
|
arguments: genSources build
|