fixed nested usage of markReaderIndex+readerIndex #339
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: [push, pull_request] | |
jobs: | |
prepare: | |
concurrency: ci | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate build number for push | |
id: buildnumber | |
if: ${{ github.event_name == 'push' }} | |
uses: onyxmueller/build-tag-number@v1 | |
with: | |
token: ${{ secrets.github_token }} | |
- name: Generate build number | |
id: generate | |
run: | | |
if [ $GITHUB_EVENT_NAME == 'push' ] | |
then | |
echo "build_number=${{ steps.buildnumber.outputs.build_number }}" >> $GITHUB_OUTPUT | |
else | |
echo "build_number=PR" >> $GITHUB_OUTPUT | |
fi | |
- name: Display build number | |
run: echo ${{ steps.generate.outputs.build_number }} | |
outputs: | |
build_number: ${{ steps.generate.outputs.build_number }} | |
build: | |
needs: prepare | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: 'Full' | |
worldedit: 'true' | |
spark: 'true' | |
hardcoded_optimization: 'true' | |
- name: 'Survival' | |
worldedit: 'false' | |
spark: 'true' | |
hardcoded_optimization: 'true' | |
- name: 'Optimization Only' | |
worldedit: 'false' | |
spark: 'false' | |
hardcoded_optimization: 'true' | |
- name: 'Vanilla' | |
worldedit: 'false' | |
spark: 'false' | |
hardcoded_optimization: 'false' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 8.0 | |
- name: Cache gradle files | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
./projects/mcp | |
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Setup | |
run: ./gradlew setup | |
- name: Set build number | |
run: sed -i "s/TISCarpet_build_undefined/TISCarpet_build${{ needs.prepare.outputs.build_number }}/g" src/main/java/carpet/settings/CarpetSettings.java | |
- name: Disable hardcoded optimizations | |
if: matrix.hardcoded_optimization == 'false' | |
run: | | |
sed -i "s/LITHIUM_ENABLE = true/LITHIUM_ENABLE = false/g" src/main/java/me/jellysquid/mods/lithium/LithiumConfig.java | |
sed -i "s/TISCM_OPTIMIZATION_ENABLE = true/TISCM_OPTIMIZATION_ENABLE = false/g" src/main/java/carpet/utils/TISCMConfig.java | |
- name: Disable world edit | |
if: matrix.worldedit == 'false' | |
run: | | |
sed -i "s/MOD_WORLDEDIT = true/MOD_WORLDEDIT = false/g" src/main/java/carpet/utils/TISCMConfig.java | |
- name: Create Release | |
run: ./gradlew createRelease | |
env: | |
worldedit: '${{matrix.worldedit}}' | |
spark: '${{matrix.spark}}' | |
- name: Create Installers | |
run: | | |
cd installer | |
./create_installer_all_in_one.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: '[${{matrix.name}}] TISCarpet build${{ needs.prepare.outputs.build_number }} installer' | |
path: installer/TISCarpet_installer.tar.gz |