Skip to content

Commit e7c969b

Browse files
committed
Mark checkstyle:check as not cacheable for Hibernate Search
checkstyle:check is not cache-relocatable because project resources include ${rootProject.directory}, fingerprinting the entire workspace root tree including target/ dirs from previous builds (83 cache misses). Upstream PR: hibernate/hibernate-search#5067
1 parent 26e7290 commit e7c969b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/run-experiments-hibernate-search.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ jobs:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
- name: Configure validation scripts network settings
3737
uses: gradle/develocity-oss-projects/.github/actions/configure-validation-scripts-network-settings@main
38+
- name: Mark checkstyle:check as not cacheable
39+
# checkstyle:check is not cache-relocatable because project resources include ${rootProject.directory}
40+
# which fingerprints the entire workspace root tree including target/ dirs from previous builds.
41+
# Upstream PR: https://github.com/hibernate/hibernate-search/pull/5067
42+
run: |
43+
mkdir ~/git-hooks
44+
cat > ~/git-hooks/post-checkout << 'HOOK'
45+
#!/bin/bash
46+
cat >> .mvn/develocity-custom-user-data.groovy << 'GROOVY'
47+
48+
buildCache.registerMojoMetadataProvider(context -> {
49+
context.withPlugin("maven-checkstyle-plugin", () ->
50+
context.outputs(outputs ->
51+
outputs.notCacheableBecause("checkstyle:check is not cache-relocatable: project resources include the workspace root (https://github.com/hibernate/hibernate-search/pull/5067)")
52+
)
53+
)
54+
})
55+
GROOVY
56+
HOOK
57+
chmod +x ~/git-hooks/post-checkout
58+
git config --global core.hooksPath ~/git-hooks
3859
- name: Run experiment 1
3960
uses: gradle/develocity-build-validation-scripts/.github/actions/maven/experiment-1@actions-stable
4061
env:

0 commit comments

Comments
 (0)