Skip to content

Commit b08b407

Browse files
committed
add cache mgmt to regtest jobs
1 parent 408d74c commit b08b407

File tree

2 files changed

+79
-1
lines changed

2 files changed

+79
-1
lines changed

.github/workflows/regtest.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ jobs:
4040
java-version: '21'
4141
distribution: 'temurin'
4242

43+
- name: Setup Gradle
44+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
45+
with:
46+
validate-wrappers: false
47+
48+
- name: Prepare Gradle build cache
49+
uses: ./.github/actions/ci-incr-build-cache-prepare
50+
4351
- name: Fix permissions
4452
run: mkdir -p regtests/output && chmod 777 regtests/output && chmod 777 regtests/t_*/ref/*
4553

@@ -53,9 +61,40 @@ jobs:
5361
:polaris-server:quarkusAppPartsBuild --rerun \
5462
-Dquarkus.container-image.build=true
5563
64+
- name: Save partial Gradle build cache
65+
uses: ./.github/actions/ci-incr-build-cache-save
66+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
67+
with:
68+
job-name: regtest
69+
5670
- name: Regression Test
5771
env:
5872
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
5973
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
6074
run: |
61-
docker compose -f regtests/docker-compose.yml up --build --exit-code-from regtest
75+
docker compose -f regtests/docker-compose.yml up --build --exit-code-from regtest
76+
77+
store-gradle-cache:
78+
name: Store Gradle Cache
79+
runs-on: ubuntu-24.04
80+
timeout-minutes: 30
81+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
82+
needs:
83+
- regtest
84+
steps:
85+
- name: Set up JDK 21
86+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
87+
with:
88+
java-version: '21'
89+
distribution: 'temurin'
90+
- name: Setup Gradle
91+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
92+
with:
93+
validate-wrappers: false
94+
- name: Collect partial Gradle build caches
95+
uses: ./.github/actions/ci-incr-build-cache-prepare
96+
with:
97+
cache-read-only: false
98+
- name: Trigger Gradle home cleanup
99+
run: ./gradlew --no-daemon :showVersion
100+
# Note: the "Post Gradle invocation" archives the updated build cache.

.github/workflows/spark_client_regtests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ jobs:
4040
java-version: '21'
4141
distribution: 'temurin'
4242

43+
- name: Setup Gradle
44+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
45+
with:
46+
validate-wrappers: false
47+
48+
- name: Prepare Gradle build cache
49+
uses: ./.github/actions/ci-incr-build-cache-prepare
50+
4351
- name: Fix permissions
4452
run: mkdir -p regtests/output && chmod 777 regtests/output && chmod 777 regtests/t_*/ref/*
4553

@@ -56,10 +64,41 @@ jobs:
5664
:polaris-server:quarkusAppPartsBuild --rerun \
5765
-Dquarkus.container-image.build=true
5866
67+
- name: Save partial Gradle build cache
68+
uses: ./.github/actions/ci-incr-build-cache-save
69+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
with:
71+
job-name: spark-plugin-regtest
72+
5973
# NOTE: the regression test runs with spark 3.5.5 and scala 2.12 in Java 17. We also have integration
6074
# tests runs with the existing gradle.yml, which only runs on Java 21. Since spark Java compatibility
6175
# for 3.5 is 8, 11, and 17, we should run spark client with those compatible java versions.
6276
# TODO: add separate spark client CI and run with Java 8, 11 and 17.
6377
- name: Regression Test
6478
run: |
6579
docker compose -f plugins/spark/v3.5/regtests/docker-compose.yml up --build --exit-code-from regtest
80+
81+
store-gradle-cache:
82+
name: Store Gradle Cache
83+
runs-on: ubuntu-24.04
84+
timeout-minutes: 30
85+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
86+
needs:
87+
- spark-plugin-regtest
88+
steps:
89+
- name: Set up JDK 21
90+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
91+
with:
92+
java-version: '21'
93+
distribution: 'temurin'
94+
- name: Setup Gradle
95+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
96+
with:
97+
validate-wrappers: false
98+
- name: Collect partial Gradle build caches
99+
uses: ./.github/actions/ci-incr-build-cache-prepare
100+
with:
101+
cache-read-only: false
102+
- name: Trigger Gradle home cleanup
103+
run: ./gradlew --no-daemon :showVersion
104+
# Note: the "Post Gradle invocation" archives the updated build cache.

0 commit comments

Comments
 (0)