-
Notifications
You must be signed in to change notification settings - Fork 49
57 lines (50 loc) · 2.18 KB
/
non-task-caching-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Non task caching tests
on:
push:
branches: [ gk/nonTaskCacheTests ]
workflow_dispatch:
jobs:
runTests:
name: Non task caching tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
exp:
- cache: 'transforms'
args: '-Dscan.tag.baseline-transforms'
- cache: 'transforms'
args: '-Dscan.tag.transformCachingDisabled -Dorg.gradle.internal.transform-caching-disabled'
- cache: 'kotlin-dsl'
args: '-Dscan.tag.baseline-kotlin-dsl'
- cache: 'kotlin-dsl'
args: '-Dscan.tag.kotlinScriptCachingDisabled -Dorg.gradle.internal.kotlin-script-caching-disabled'
- cache: 'groovy-dsl'
args: '-Dscan.tag.baseline-groovy-dsl'
- cache: 'groovy-dsl'
args: '-Dscan.tag.groovyScriptCachingDisabled -Dorg.gradle.internal.groovy-script-caching-disabled'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Clear Gradle user home caches we don't want
run: |
cache='${{ matrix.exp.cache }}'
args='${{ matrix.exp.args }}'
echo "Test caches/*/$cache removal with $args"
echo "Running build once to fully populate Gradle User Home"
./gradlew help -Dscan.tag.remote-cache-experiment-init --no-daemon --no-configuration-cache -Ddevelocity.deprecation.muteWarnings=true
./gradlew --stop
echo "Removing $cache from $homeDir/caches"
rm -rf ~/.gradle/caches/*/$cache
rm -rf ~/.gradle/caches/$cache-* # Also remove the transforms for Gradle 8.7
# Always remove the local build cache, since we are testing connection with remote build cache
rm -rf ~/.gradle/caches/build-cache-1
echo "Running build again with --${buildCache}"
./gradlew help --no-configuration-cache -Ddevelocity.deprecation.muteWarnings=true -Dscan.uploadInBackground=false $args