@@ -141,12 +141,11 @@ jobs:
141141 persist-credentials : false
142142 fetch-depth : 0
143143 submodules : recursive
144- - name : Cache Docker Volumes
145- uses : actions/cache@v5
144+ - name : Restore Docker Volumes
145+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
146146 with :
147147 path : .docker
148- key : extra-${{ matrix.image }}-${{ hashFiles('cpp/**') }}
149- restore-keys : extra-${{ matrix.image }}-
148+ key : cpp-extra-${{ matrix.image }}
150149 - name : Setup Python
151150 uses : actions/setup-python@v6
152151 with :
@@ -169,6 +168,14 @@ jobs:
169168 done
170169 fi
171170 archery docker run ${{ matrix.run-options || '' }} ${{ matrix.image }}
171+ - name : Save Docker Volumes
172+ if : ${{ !cancelled() }}
173+ continue-on-error : true
174+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
175+ with :
176+ path : .docker
177+ key : cpp-extra-${{ matrix.image }}
178+ include-hidden-files : true
172179 - name : Docker Push
173180 if : >-
174181 success() &&
@@ -204,6 +211,8 @@ jobs:
204211 contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
205212 timeout-minutes : 240
206213 permissions :
214+ actions : read
215+ contents : read
207216 # This is for using GitHub Packages for vcpkg cache
208217 packages : write
209218 strategy :
@@ -227,12 +236,11 @@ jobs:
227236 - name : Free up disk space
228237 run : |
229238 ci/scripts/util_free_space.sh
230- - name : Cache Docker Volumes
231- uses : actions/cache@v5
239+ - name : Restore Docker Volumes
240+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
232241 with :
233242 path : .docker
234- key : jni-${{ matrix.platform.runs-on }}-${{ hashFiles('cpp/**') }}
235- restore-keys : jni-${{ matrix.platform.runs-on }}-
243+ key : jni-${{ matrix.platform.runs-on }}
236244 - name : Setup Python
237245 uses : actions/setup-python@v6
238246 with :
@@ -248,6 +256,14 @@ jobs:
248256 run : |
249257 source ci/scripts/util_enable_core_dumps.sh
250258 archery docker run cpp-jni
259+ - name : Save Docker Volumes
260+ if : ${{ !cancelled() }}
261+ continue-on-error : true
262+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
263+ with :
264+ path : .docker
265+ key : jni-${{ matrix.platform.runs-on }}
266+ include-hidden-files : true
251267 - name : Docker Push
252268 if : >-
253269 success() &&
@@ -300,12 +316,11 @@ jobs:
300316 - name : Prepare ccache
301317 run : |
302318 echo "CCACHE_DIR=${PWD}/ccache" >> ${GITHUB_ENV}
303- - name : Cache ccache
304- uses : actions/cache@v5
319+ - name : Restore ccache
320+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
305321 with :
306322 path : ccache
307- key : jni-macos-${{ hashFiles('cpp/**') }}
308- restore-keys : jni-macos-
323+ key : jni-macos
309324 - name : CMake
310325 run : |
311326 cmake \
@@ -347,6 +362,13 @@ jobs:
347362 cmake --build cpp/examples/minimal_build.build
348363 cd cpp/examples/minimal_build
349364 ../minimal_build.build/arrow-example
365+ - name : Save ccache
366+ if : ${{ !cancelled() }}
367+ continue-on-error : true
368+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
369+ with :
370+ path : ccache
371+ key : jni-macos
350372
351373 odbc-linux :
352374 needs : check-labels
@@ -372,12 +394,11 @@ jobs:
372394 persist-credentials : false
373395 fetch-depth : 0
374396 submodules : recursive
375- - name : Cache Docker Volumes
376- uses : actions/cache@v5
397+ - name : Restore Docker Volumes
398+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
377399 with :
378400 path : .docker
379- key : ubuntu-cpp-odbc-${{ hashFiles('cpp/**') }}
380- restore-keys : ubuntu-cpp-odbc-
401+ key : ubuntu-cpp-odbc
381402 - name : Setup Python on hosted runner
382403 uses : actions/setup-python@v6
383404 with :
@@ -393,6 +414,14 @@ jobs:
393414 sudo sysctl -w vm.mmap_rnd_bits=28
394415 source ci/scripts/util_enable_core_dumps.sh
395416 archery docker run ubuntu-cpp-odbc
417+ - name : Save Docker Volumes
418+ if : ${{ !cancelled() }}
419+ continue-on-error : true
420+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
421+ with :
422+ path : .docker
423+ key : ubuntu-cpp-odbc
424+ include-hidden-files : true
396425 - name : Docker Push
397426 if : >-
398427 success() &&
@@ -464,12 +493,11 @@ jobs:
464493 id : ccache-info
465494 run : |
466495 echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
467- - name : Cache ccache
468- uses : actions/cache@v5.0.2
496+ - name : Restore ccache
497+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
469498 with :
470499 path : ${{ steps.ccache-info.outputs.cache-dir }}
471- key : cpp-odbc-ccache-macos-${{ matrix.macos-version }}-${{ matrix.build-type }}-${{ hashFiles('cpp/**') }}
472- restore-keys : cpp-odbc-ccache-macos-${{ matrix.macos-version }}-${{ matrix.build-type }}-
500+ key : cpp-odbc-ccache-macos-${{ matrix.macos-version }}-${{ matrix.build-type }}
473501 - name : Build
474502 run : |
475503 # Homebrew uses /usr/local as prefix. So packages
@@ -486,6 +514,13 @@ jobs:
486514 export ARROW_CMAKE_ARGS="-DODBC_INCLUDE_DIR=$ODBC_INCLUDE_DIR"
487515 export CXXFLAGS="$CXXFLAGS -I$ODBC_INCLUDE_DIR"
488516 ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
517+ - name : Save ccache
518+ if : ${{ !cancelled() }}
519+ continue-on-error : true
520+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
521+ with :
522+ path : ${{ steps.ccache-info.outputs.cache-dir }}
523+ key : cpp-odbc-ccache-macos-${{ matrix.macos-version }}-${{ matrix.build-type }}
489524 - name : Setup Python
490525 uses : actions/setup-python@v6
491526 with :
@@ -541,6 +576,8 @@ jobs:
541576 contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
542577 timeout-minutes : 240
543578 permissions :
579+ actions : read
580+ contents : read
544581 packages : write
545582 env :
546583 ARROW_BUILD_SHARED : ON
@@ -589,12 +626,11 @@ jobs:
589626 shell : bash
590627 run : |
591628 echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
592- - name : Cache ccache
593- uses : actions/cache@v5
629+ - name : Restore ccache
630+ uses : apache/infrastructure- actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
594631 with :
595632 path : ${{ steps.ccache-info.outputs.cache-dir }}
596- key : cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
597- restore-keys : cpp-odbc-ccache-windows-x64-
633+ key : cpp-odbc-ccache-windows-x64
598634 - name : Checkout vcpkg
599635 uses : actions/checkout@v6
600636 with :
@@ -630,6 +666,13 @@ jobs:
630666 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
631667 set VCPKG_ROOT=%VCPKG_ROOT_KEEP%
632668 bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
669+ - name : Save ccache
670+ if : ${{ !cancelled() }}
671+ continue-on-error : true
672+ uses : apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
673+ with :
674+ path : ${{ steps.ccache-info.outputs.cache-dir }}
675+ key : cpp-odbc-ccache-windows-x64
633676 - name : Register Flight SQL ODBC Driver
634677 shell : cmd
635678 run : |
0 commit comments