Skip to content

Minor performance improvement #177

Minor performance improvement

Minor performance improvement #177

Workflow file for this run

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