diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-22 14:13:22 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-22 14:29:57 +0200 |
| commit | 147951f39de8f93eba6c7b0b7e6e5c9d2bce32e7 (patch) | |
| tree | e034e01c1eea52704c84070c886cdced2576351d /.github/workflows/build.yml | |
| parent | ba32561e4b0e00c00d528df615a58e396e0fddc0 (diff) | |
ci: Optimize Gradle build performance in Github Actions
This change updates the Github Actions Gradle workflows in order to
improve the runtime performance of these workflows. We have now enabled
build caching as well as parallel builds to speed up the build process.
Moreover, we now cache the Gradle wrapper.
Diffstat (limited to '.github/workflows/build.yml')
| -rw-r--r-- | .github/workflows/build.yml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28e5846b..257ad2e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,16 +26,25 @@ jobs: java-version: ${{ matrix.java }} - name: Grant execute permission for gradlew run: chmod +x gradlew - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }} + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-${{ matrix.java }}-gradle- - name: Build with Gradle - run: ./gradlew assemble + run: ./gradlew classes - name: Check with Gradle run: ./gradlew check codeCoverageReport + - name: Cleanup Gradle Daemons + run: ./gradlew --stop + - name: Cleanup Gradle Cache + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties + shell: bash - name: Publish report if: always() uses: mikepenz/action-junit-report@v2 |
