Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use restore-key to continually update ccache storage #1263

Merged
merged 4 commits into from
May 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 10G
CCACHE_MAXSIZE: 2G
CCACHE_KEY_SUFFIX: r1

# NOTE this only builds core unittests to reduce the output size. if we
Expand All @@ -29,7 +29,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux_ubuntu_debug_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-linux_ubuntu_debug_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux_ubuntu_debug_${{ env.CCACHE_KEY_SUFFIX }}_

- name: Configure
run: >
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CTEST_OUTPUT_ON_FAILURE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 10G
CCACHE_MAXSIZE: 2G
CCACHE_KEY_SUFFIX: r1

jobs:
Expand All @@ -36,7 +36,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-${{ matrix.image }}_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-${{ matrix.image }}_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.image }}_${{ env.CCACHE_KEY_SUFFIX }}_

- name: Configure
# setting CMAKE_CXX_STANDARD=17 is a workaround for a bug in the
Expand Down Expand Up @@ -108,7 +110,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux_ubuntu_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand Down Expand Up @@ -279,7 +283,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-linux-nodeps_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand Down Expand Up @@ -365,7 +371,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand Down Expand Up @@ -419,7 +427,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-cuda_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand All @@ -444,7 +454,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-exatrkx_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-exatrkx_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-exatrkx_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand Down Expand Up @@ -472,7 +484,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/ccache
key: ${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}_${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-sycl_${{ env.CCACHE_KEY_SUFFIX }}_


- name: Configure
Expand Down