Skip to content

Commit

Permalink
Update CMMC
Browse files Browse the repository at this point in the history
  • Loading branch information
tier940 committed May 5, 2024
1 parent 039905e commit 1a822a3
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 46 deletions.
33 changes: 33 additions & 0 deletions .github/actions/build_setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Setup
description: Setup for standard Python build

inputs:
update-cache:
description: If cache should be updated
required: false
default: 'false'

runs:
using: 'composite'

steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install uv
shell: bash
run: pip install uv

- name: Setup Python Cache
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
shell: bash
run: uv pip install --system -r ./buildtools/requirements.txt
37 changes: 16 additions & 21 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
preview_version:
description: 'Preview version'
required: true
only_artifact:
description: 'Only push artifact'
type: boolean
default: false

env:
VERSION_NORMAL: "v${{ github.event.inputs.version }}-pr-${{ github.event.inputs.preview_version }}"
Expand Down Expand Up @@ -44,6 +48,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Build
uses: ./.github/actions/build_setup

- if: matrix.version == 'LWJGL3'
name: Set the version (${{ matrix.version }})
run: |
Expand All @@ -60,25 +67,6 @@ jobs:
sed -i -e "s/MODPACKVERSION/${{ env.VERSION_NORMAL }}/g" ./instance.cfg
sed -i -e "s/MODPACKVERSION/${{ env.VERSION_NORMAL }}/g" ./overrides/config/craftpresence.json
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install uv
run: pip install uv

- name: Setup Python Cache
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: uv pip install --system -r ./buildtools/requirements.txt

- if: matrix.version == 'LWJGL3'
name: Remove lwjgl3 not supported mods
run: |
Expand Down Expand Up @@ -127,7 +115,7 @@ jobs:
mv -vf .minecraft/* ./
zip -r ./${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip ./docker-compose.yml ./PleaseRead.txt ./log4j2_112-116.xml ./Install.bat ./Install.sh ./ServerStart.bat ./ServerStart.sh ./settings.bat ./settings.sh ./TmuxServer.sh ./bansoukou/ ./config/ ./local/ ./mods/ ./resources/ ./scripts/
- if: matrix.version == 'LWJGL3'
- if: matrix.version == 'LWJGL3' || ${{ github.event.inputs.only_artifact }} == false
name: Create GitHub Release (${{ matrix.version }})
uses: softprops/action-gh-release@v2
with:
Expand All @@ -137,7 +125,7 @@ jobs:
files: |
./${{ env.NAME }}-${{ env.VERSION_LWJGL3 }}-mmc.zip
- if: matrix.version == 'NORMAL'
- if: matrix.version == 'NORMAL' || ${{ github.event.inputs.only_artifact }} == false
name: Create GitHub Release (${{ matrix.version }})
uses: softprops/action-gh-release@v2
with:
Expand All @@ -148,3 +136,10 @@ jobs:
./${{ env.NAME }}-${{ env.VERSION_NORMAL }}-cf.zip
./${{ env.NAME }}-${{ env.VERSION_NORMAL }}-mmc.zip
./${{ env.NAME }}-${{ env.VERSION_NORMAL }}-server.zip
- if: ${{ github.event.inputs.only_artifact }} == true
name: Create GitHub Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.NAME }}-v${{ github.event.inputs.version }}-${{ github.event.inputs.preview_version }}
path: ./${{ env.NAME }}-*.zip
22 changes: 3 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
exit 1
fi
- name: Setup Build
uses: ./.github/actions/build_setup

- name: Set the version
run: |
echo "GregTech Expert 2 ${{ env.FULL_VERSION }}" > ./overrides/config/txloader/load/custommainmenu/version.txt
Expand All @@ -58,25 +61,6 @@ jobs:
rm -rf ./overrides/resourcepacks/.gitkeep
zip -r ./${{ env.NAME }}-${{ env.FULL_VERSION }}-cf.zip ./manifest.json ./modlist.html ./manifest.json ./modlist.html ./overrides/bansoukou/ ./overrides/config/ ./overrides/local/ ./overrides/resourcepacks/ ./overrides/scripts/
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install uv
run: pip install uv

- name: Setup Python Cache
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: uv pip install --system -r ./buildtools/requirements.txt

- name: Run Python
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions cmmc/instance.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ OverrideJavaLocation=true
OverrideMemory=false
OverrideNativeWorkarounds=false
OverrideWindow=false
JvmArgs=-XX:+UseZGC -XX:+ZGenerational
JvmArgs=-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:+UseZGC -XX:-ZProactive
iconKey=default
lastLaunchTime=0
lastTimePlayed=0
name=[CleanroomMMC] GregTech Expert 2 MODPACKVERSION
notes=This instance is built using Github Action.\nUsing installer artifact from commit: fe44c7f38257418a13dca503baa38f0939825aba\nAction URL: https://github.com/CleanroomMC/Cleanroom/actions/runs/8917859214
notes=This instance is built using Github Action.\nUsing installer artifact from commit: 5485a8e5b95870310f9f4ce3fa19139fde4b2c98\nAction URL: https://github.com/CleanroomMC/Cleanroom/actions/runs/8955523547
totalTimePlayed=0
Binary file not shown.
4 changes: 2 additions & 2 deletions cmmc/mmc-pack.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"uid": "net.minecraft"
}
],
"cachedVersion": "15.24.0.3039",
"cachedVersion": "0.2.0",
"uid": "net.minecraftforge",
"version": "15.24.0.3039"
"version": "0.2.0"
}
],
"formatVersion": 1
Expand Down
4 changes: 2 additions & 2 deletions cmmc/patches/net.minecraftforge.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"formatVersion": 1,
"libraries": [
{
"name": "com.cleanroommc:cleanroom:15.24.0.3039-universal",
"name": "com.cleanroommc:cleanroom:0.2.0-universal",
"MMC-hint": "local"
},
{
Expand Down Expand Up @@ -674,5 +674,5 @@
}
],
"uid": "net.minecraftforge",
"version": "15.24.0.3039"
"version": "0.2.0"
}

0 comments on commit 1a822a3

Please sign in to comment.