github actions get ccache working

This commit is contained in:
Daniel Agar
2020-06-20 13:18:06 -04:00
committed by GitHub
parent a641982ce7
commit 32828c99fd
5 changed files with 117 additions and 38 deletions
+22 -7
View File
@@ -22,20 +22,35 @@ jobs:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: check_format
env:
CI: true
run: make check_format
- uses: actions/cache@v1.1.0
id: ccache-persistence
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v1.1.0
with:
path: ~/.ccache
key: ccache-main-tests
restore-keys: |
ccache-main-tests
key: ${{matrix.ubuntu_release}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.ubuntu_release}}-ccache-
- name: setup ccache
run: mkdir -p ~/.ccache && echo "max_size = 300M" > ~/.ccache/ccache.conf && ccache -z && ccache -s
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: main tests
run: make tests
- name: ccache post-run
run: ccache -s && ccache -z
run: ccache -s