From b8d4f773c63942b9c2d5ebee74366b497306e81f Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Sat, 13 May 2023 15:23:38 +0200 Subject: [PATCH 1/4] Use ccache --- .github/actions/build_pandas/action.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index b1829e651443b..83176bc4693cb 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -14,6 +14,25 @@ runs: micromamba list shell: bash -el {0} + - name: Make ccache-action key + id: ccache-action-key + run: | + key="${{ runner.os }}--${{ runner.arch }}--${{ github.workflow }}" + # Date: Daily invalidation of all ccaches as an extra safety measure. + key="$key--$(/bin/date -u '+%Y%m%d')" + # Python version: Separate caches for each Python version. This reduces the number of cache misses. + key="$key--$(python -V)" + # Cache version: Bump this number to manually invalidate the cache. + key="$key--0" + + echo "key=$key" >> $GITHUB_OUTPUT + shell: bash + - name: Use sccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + variant: sccache + key: ${{ steps.ccache-action-key.outputs.key }} + - name: Build Pandas run: | if [[ ${{ inputs.editable }} == "true" ]]; then From c5bd013fd6144fd5679071d6a3b552942eb2c51e Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Fri, 19 May 2023 14:12:17 +0200 Subject: [PATCH 2/4] Use Mozilla-Actions/sccache-action --- .github/actions/build_pandas/action.yml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index 83176bc4693cb..f96ecf811056e 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -14,24 +14,8 @@ runs: micromamba list shell: bash -el {0} - - name: Make ccache-action key - id: ccache-action-key - run: | - key="${{ runner.os }}--${{ runner.arch }}--${{ github.workflow }}" - # Date: Daily invalidation of all ccaches as an extra safety measure. - key="$key--$(/bin/date -u '+%Y%m%d')" - # Python version: Separate caches for each Python version. This reduces the number of cache misses. - key="$key--$(python -V)" - # Cache version: Bump this number to manually invalidate the cache. - key="$key--0" - - echo "key=$key" >> $GITHUB_OUTPUT - shell: bash - name: Use sccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - variant: sccache - key: ${{ steps.ccache-action-key.outputs.key }} + uses: https://github.com/Mozilla-Actions/sccache-action - name: Build Pandas run: | @@ -41,3 +25,5 @@ runs: pip install . --no-build-isolation -v fi shell: bash -el {0} + env: + SCCACHE_GHA_ENABLED: true From 384c4df971c458a1a0fdb8f98b62d2147af476f9 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Fri, 19 May 2023 21:47:17 +0200 Subject: [PATCH 3/4] Update .github/actions/build_pandas/action.yml Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- .github/actions/build_pandas/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index f96ecf811056e..4c7fbd053a46e 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -15,7 +15,7 @@ runs: shell: bash -el {0} - name: Use sccache - uses: https://github.com/Mozilla-Actions/sccache-action + uses: mozilla-actions/sccache-action@v0.0.3 - name: Build Pandas run: | From bc4829ce459fad724b1a274fa12bbb4f6e84339b Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Fri, 19 May 2023 23:56:29 +0200 Subject: [PATCH 4/4] Does this make a difference? --- .github/actions/build_pandas/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index 4c7fbd053a46e..15efd6719b7e0 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -26,4 +26,4 @@ runs: fi shell: bash -el {0} env: - SCCACHE_GHA_ENABLED: true + SCCACHE_GHA_ENABLED: "true"