[
https://issues.apache.org/jira/browse/ARROW-14880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449350#comment-17449350
]
Kouhei Sutou commented on ARROW-14880:
--------------------------------------
Oh, I didn't notice it. Our C GLib & Ruby CI already uses ccache.
I haven't tried it but the following will work:
{noformat}
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index e6ceccc2e..994495b7d 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -153,6 +153,19 @@ jobs:
rm -f /usr/local/bin/2to3
brew update --preinstall
brew bundle --file=cpp/Brewfile
+ - name: Setup ccache
+ run: |
+ ci/scripts/ccache_setup.sh
+ - name: ccache info
+ id: ccache-info
+ run: |
+ echo "::set-output name=cache-dir::$(ccache --get-config cache_dir)"
+ - name: Cache ccache
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.ccache-info.outputs.cache-dir }}
+ key: cpp-ccache-macos-${{ hashFiles('cpp/**') }}
+ restore-keys: cpp-ccache-macos-
- name: Build
shell: bash
run: ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
{noformat}
> [C++][CI] Enable ccache on macOS CI builds
> ------------------------------------------
>
> Key: ARROW-14880
> URL: https://issues.apache.org/jira/browse/ARROW-14880
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Continuous Integration
> Reporter: Antoine Pitrou
> Priority: Minor
>
> We could install and enable ccache on macOS Github Actions jobs. It would
> probably speed up a lot of builds.
> Apparently ccache is available on Homebrew. Here is an example using it:
> https://github.com/azerothcore/azerothcore-wotlk/blob/master/.github/workflows/macos_build.yml#L26-L33
> {code:yaml}
> - name: Cache
> uses: actions/cache@v2
> with:
> path: ~/Library/Caches/ccache
> key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
> restore-keys: |
> ccache:${{ matrix.os }}:${{ github.ref }}
> ccache:${{ matrix.os }}
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)