|
29 | 29 | - name: 'Setup: Checkout plugin' |
30 | 30 | uses: actions/checkout@v2 |
31 | 31 |
|
| 32 | + # Restore Maven and Tycho dependencies cache |
| 33 | + - name: 'Cache: Maven and Tycho repository (restore)' |
| 34 | + uses: actions/cache/restore@v4 |
| 35 | + with: |
| 36 | + path: | |
| 37 | + ~/.m2/repository |
| 38 | + !~/.m2/repository/io/openliberty/tools/eclipse |
| 39 | + key: ${{ runner.os }}-maven-tycho-${{ hashFiles('pom.xml', '.mvn/**', 'releng/**') }} |
| 40 | + restore-keys: | |
| 41 | + ${{ runner.os }}-maven-tycho- |
| 42 | +
|
| 43 | + # Restore Gradle dependencies cache |
| 44 | + - name: 'Cache: Gradle (restore)' |
| 45 | + uses: actions/cache/restore@v4 |
| 46 | + with: |
| 47 | + path: | |
| 48 | + ~/.gradle/caches |
| 49 | + ~/.gradle/wrapper |
| 50 | + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 51 | + restore-keys: | |
| 52 | + ${{ runner.os }}-gradle- |
| 53 | +
|
| 54 | + # Restore downloaded tools cache (JDK, Maven, Gradle) |
| 55 | + - name: 'Cache: Downloaded tools (restore)' |
| 56 | + uses: actions/cache/restore@v4 |
| 57 | + with: |
| 58 | + path: test-tools/liberty-dev-tools |
| 59 | + key: ${{ runner.os }}-tools-jdk21.0.3-maven3.9.6-gradle8.8 |
| 60 | + restore-keys: | |
| 61 | + ${{ runner.os }}-tools- |
| 62 | +
|
32 | 63 | # Install the required software. |
33 | | - - name: 'Setup: Install required software' |
| 64 | + - name: 'Setup: Install required software' |
34 | 65 | run: bash ./tests/resources/ci/scripts/setup.sh |
35 | 66 |
|
36 | 67 | # Build the plugin. |
|
50 | 81 | with: |
51 | 82 | name: test-app-logs |
52 | 83 | path: logs |
| 84 | + |
| 85 | + # Save Maven and Tycho dependencies cache (even on failure) |
| 86 | + - name: 'Cache: Maven and Tycho repository (save)' |
| 87 | + uses: actions/cache/save@v4 |
| 88 | + if: always() |
| 89 | + with: |
| 90 | + path: | |
| 91 | + ~/.m2/repository |
| 92 | + !~/.m2/repository/io/openliberty/tools/eclipse |
| 93 | + key: ${{ runner.os }}-maven-tycho-${{ hashFiles('pom.xml', '.mvn/**', 'releng/**') }} |
| 94 | + |
| 95 | + # Save Gradle dependencies cache (even on failure) |
| 96 | + - name: 'Cache: Gradle (save)' |
| 97 | + uses: actions/cache/save@v4 |
| 98 | + if: always() |
| 99 | + with: |
| 100 | + path: | |
| 101 | + ~/.gradle/caches |
| 102 | + ~/.gradle/wrapper |
| 103 | + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 104 | + |
| 105 | + # Save downloaded tools cache (even on failure) |
| 106 | + - name: 'Cache: Downloaded tools (save)' |
| 107 | + uses: actions/cache/save@v4 |
| 108 | + if: always() |
| 109 | + with: |
| 110 | + path: test-tools/liberty-dev-tools |
| 111 | + key: ${{ runner.os }}-tools-jdk21.0.3-maven3.9.6-gradle8.8 |
0 commit comments