aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2024-09-14 21:04:26 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2024-09-14 21:25:22 +0200
commite32524c38f61f939eb41cccad67699bd27601568 (patch)
tree8e542204e5687a3b8fa60689e1443a058cd2ba7e
parentchore(deps): bump dependencies (diff)
downloadrefinery-e32524c38f61f939eb41cccad67699bd27601568.tar.gz
refinery-e32524c38f61f939eb41cccad67699bd27601568.tar.zst
refinery-e32524c38f61f939eb41cccad67699bd27601568.zip
build: fix workflow caching
-rw-r--r--.github/workflows/build.yml22
1 files changed, 9 insertions, 13 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a65b0877..a0cbe25c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -39,39 +39,35 @@ jobs:
39 with: 39 with:
40 java-version: 21 40 java-version: 21
41 distribution: corretto 41 distribution: corretto
42 - name: Checkout code
43 uses: actions/checkout@v4
44 with:
45 fetch-depth: ${{ !steps.check-secret.outputs.is_SONAR_TOKEN_set && 1 || 0 }} # Shallow clones should be disabled for a better relevancy of SonarCloud analysis
42 - name: Cache Gradle packages 46 - name: Cache Gradle packages
43 uses: actions/cache@v4 47 uses: actions/cache@v4
44 with: 48 with:
45 path: | 49 path: |
46 ~/.gradle/caches 50 ~/.gradle/caches
47 key: ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }} 51 key: ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle.kts', 'gradle.properties', 'gradle/libs.versions.toml', 'gradle/pluginLibs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
48 restore-keys: ${{ matrix.os }}-gradle
49 - name: Cache Sonar packages 52 - name: Cache Sonar packages
50 uses: actions/cache@v4 53 uses: actions/cache@v4
51 if: ${{ steps.check-secret.outputs.is_SONAR_TOKEN_set }} 54 if: ${{ steps.check-secret.outputs.is_SONAR_TOKEN_set }}
52 with: 55 with:
53 path: | 56 path: |
54 ~/.sonar/cache 57 ~/.sonar/cache
55 key: ${{ matrix.os }}-sonar 58 key: ${{ matrix.os }}-sonar-${{ hashFiles('gradle/pluginLibs.versions.toml') }}
56 restore-keys: ${{ matrix.os }}-sonar
57 - name: Checkout code
58 uses: actions/checkout@v4
59 with:
60 fetch-depth: ${{ !steps.check-secret.outputs.is_SONAR_TOKEN_set && 1 || 0 }} # Shallow clones should be disabled for a better relevancy of SonarCloud analysis
61 - name: Cache node distribution 59 - name: Cache node distribution
62 uses: actions/cache@v4 60 uses: actions/cache@v4
63 with: 61 with:
64 path: | 62 path: |
65 **/.node 63 .node
66 key: ${{ matrix.os }}-node-${{ hashFiles('gradle.properties') }} 64 key: ${{ matrix.os }}-node-${{ hashFiles('gradle.properties') }}
67 restore-keys: ${{ matrix.os }}-node
68 - name: Cache yarn packages 65 - name: Cache yarn packages
69 uses: actions/cache@v4 66 uses: actions/cache@v4
70 with: 67 with:
71 path: | 68 path: |
72 **/.yarn/cache 69 .yarn/cache
73 key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 70 key: ${{ matrix.os }}-yarn-${{ hashFiles('yarn.lock') }}
74 restore-keys: ${{ matrix.os }}-yarn
75 - name: Gradle build 71 - name: Gradle build
76 run: | 72 run: |
77 ./gradlew build -Pci --info --stacktrace --max-workers 4 --no-daemon 73 ./gradlew build -Pci --info --stacktrace --max-workers 4 --no-daemon