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

Refresh ccache once per day (#1340) #17

Closed
wants to merge 1 commit into from
Closed
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
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ jobs:
paths:
- ~/deps
- run:
name: "Calculate merge-base for CCache"
command: git merge-base origin/main HEAD > merge-base
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-{{ arch }}-{{ checksum "merge-base" }}
- velox-ccache-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: "Build on MacOS"
command: |
Expand All @@ -75,7 +75,7 @@ jobs:
no_output_timeout: 1h
- save_cache:
name: "Save CCache cache"
key: velox-ccache-{{ arch }}-{{ checksum "merge-base" }}
key: velox-ccache-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/

Expand All @@ -84,12 +84,12 @@ jobs:
steps:
- checkout
- run:
name: "Calculate merge-base for CCache"
command: git merge-base origin/main HEAD > merge-base
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-{{ arch }}-{{ checksum "merge-base" }}
- velox-ccache-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: Build
command: |
Expand All @@ -102,16 +102,16 @@ jobs:
no_output_timeout: 1h
- store_artifacts:
path: '_build/debug/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
- run:
name: Run Unit Tests
command: |
make unittest NUM_THREADS=8
no_output_timeout: 1h
- save_cache:
name: "Save CCache cache"
key: velox-ccache-{{ arch }}-{{ checksum "merge-base" }}
paths:
- .ccache/

format-check:
executor: check
Expand Down