-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.64 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
name: Build on push or pull request
on: [ push, pull_request ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
- 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/main' }}
arguments: build --scan --stacktrace --warning-mode all
- name: Optimise built jar file
run: java -ea -jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar optimise ./deft4j-cmd/build/libs/deft4j-cmd-all.jar ./deft4j-cmd/build/libs/deft4j-cmd-all-opt.jar
- name: Optimise built jar file
run: |
rm ./deft4j-cmd/build/libs/deft4j-cmd-all.jar
mv ./deft4j-cmd/build/libs/deft4j-cmd-all-opt.jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar
- name: Optimise built jar file
run: java -ea -jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar optimise --mode=CHEAP ./deft4j-cmd/build/libs/deft4j-cmd.jar ./deft4j-cmd/build/libs/deft4j-cmd.jar
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Package-${{ matrix.os }}
path: |
deft4j-base/build/libs
deft4j-cmd/build/libs
deft4j-compress/build/libs
deft4j-container/build/libs