Make ktfmt up to 100x faster via native-image
#713
Workflow file for this run
This file contains hidden or 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
| name: Build and Test | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| branches: | |
| - main | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # test against relevant LTS versions of Java | |
| java: [ 17, 21 ] | |
| name: Build ktfmt on Java ${{ matrix.java }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: zulu | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25.0.1' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| set-java-home: 'false' | |
| native-image-job-reports: 'true' | |
| - name: Build ktfmt_idea_plugin | |
| run: ./gradlew :idea_plugin:build --stacktrace --no-daemon | |
| - name: Build the Online Formatter | |
| run: ./gradlew :lambda:build --stacktrace --no-daemon | |
| - name: Build ktfmt | |
| run: ./gradlew :ktfmt:build --stacktrace --no-daemon | |
| - name: Build Native Image | |
| run: ./gradlew :ktfmt:nativeCompile --stacktrace --no-daemon && ./ktfmt/build/native/nativeCompile/ktfmt --version |