Skip to content

Commit

Permalink
Tune GHA gradle cache
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Dec 13, 2023
1 parent 69a193b commit cae6d80
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
distribution: 'temurin'
java-version: 17
cache: gradle
cache-dependency-path: |
**/version.gradle
**/verification-metadata.xml
- name: spotless
run: ./gradlew --no-daemon --parallel clean spotlessCheck
javadoc_17:
Expand All @@ -27,10 +30,13 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
distribution: 'temurin'
java-version: 17
cache: gradle
cache-dependency-path: |
**/version.gradle
**/verification-metadata.xml
- name: javadoc (JDK 17)
run: ./gradlew --no-daemon clean javadoc
8 changes: 6 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ jobs:
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
distribution: 'temurin'
java-version: 17
cache: gradle
cache-dependency-path: |
**/version.gradle
**/verification-metadata.xml
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ jobs:
runs-on: [besu-research-ubuntu-16]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
cache: gradle
cache-dependency-path: |
**/version.gradle
**/verification-metadata.xml
- name: Login to DockerHub
run: echo '${{ secrets.DOCKER_PASSWORD_RW }}' | docker login -u '${{ secrets.DOCKER_USER_RW }}' --password-stdin
- name: Setup Gradle
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,20 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: gradle
cache-dependency-path: |
**/version.gradle
**/verification-metadata.xml
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down

0 comments on commit cae6d80

Please sign in to comment.