forked from iDiamondhunter/More-bows
-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (58 loc) · 2.72 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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 (Forge 1.20.x - snapshot)
on:
push:
branches:
- forge-1.20.x
pull_request:
branches:
- forge-1.20.x
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Install advancecomp
run: sudo apt-get install advancecomp
- name: Install strip-nondeterminism
run: sudo apt-get install strip-nondeterminism
- name: Install jq
run: sudo apt-get install jq
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-read-only: ${{ github.ref != 'refs/heads/forge-1.20.x' }}
arguments: build --scan --stacktrace --warning-mode all
- name: Rezip mod .jar files to remove directory entries
run: bash removeDirectoryEntries.sh
- name: Run strip-nondeterminism on built .jar files
run: strip-nondeterminism build/libs/*.jar
- name: Run advzip (-i 99) on built .jar files
run: advzip --shrink-insane -kzi 99 -p build/libs/*.jar
- name: Run ECT on built .jar files
run: for file in ./build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-9) on built .jar files
run: for file in ./build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -9 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-99) on built .jar files
run: for file in ./build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -99 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-30060) on built .jar files
run: for file in ./build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -30060 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-90032) on built .jar files
run: for file in ./build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -90032 --disable-png --disable-jpg -strip -zip $file; done
- name: Run JarTighten on built .jar files
run: for file in ./build/libs/*.jar; do java -jar ./ci-tools/JarTighten-1.2.12-all.jar -o -c -E -S -t -z -j --mode=MULTI_CHEAP --zopfli-iter=99 $file $file; done
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Package
path: build/libs