Skip to content

Commit

Permalink
Replace actions/cache with new setup-java cache feature of GitHub Act…
Browse files Browse the repository at this point in the history
…ions (#1800)

Motivation:

Github Actions announced a new "cache" feature for setup-java:
https://github.blog/changelog/2021-08-30-github-actions-setup-java-now-supports-dependency-caching/

Modifications:

- Replace actions/cache with new setup-java cache feature;

Result:

No custom `actions/cache` step, less yaml code for GitHub Actions
configuration.
  • Loading branch information
sullis authored and idelpivnitskiy committed Sep 24, 2021
1 parent 40d4e5f commit e37ff4c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci-prb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,11 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'gradle'
- name: Print JDK Version
run: java -version
- name: Make gradlew Executable
run: chmod +x gradlew
- name: Cache Gradle Packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
# https://github.community/t/error-the-paging-file-is-too-small-for-this-operation-to-complete/17141
- name: Configure Windows Pagefile
if: ${{ runner.os == 'Windows' }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci-prq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'gradle'
- name: Print JDK Version
run: java -version
- name: Make gradlew Executable
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Build with Gradle
env:
CI: true
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'gradle'
- name: Print JDK Version
run: java -version
- name: Make gradlew Executable
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Build with Gradle
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'gradle'
- name: Print JDK Version
run: java -version
- name: Make gradlew Executable
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Build with Gradle
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
Expand Down

0 comments on commit e37ff4c

Please sign in to comment.