Skip to content

Commit

Permalink
CI: Add ccache.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Dec 12, 2024
1 parent db69007 commit c0fc1bf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@ jobs:
env:
CI_PROJECT_ROOT: ${{ github.workspace }}/src-${{ github.sha }}
CI_BUILD_ROOT: ${{ github.workspace }}
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache

steps:
- name: "CCache: ~/.ccache Fixup"
run: |
mkdir -p /home/runner/.ccache
- name: "CCache: Restore saved cache"
uses: actions/cache@v4
with:
path: /home/runner/.ccache
key: ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-${{ github.ref }}-${{ github.sha }}
ccache-${{ github.ref }}
- name: "CCache: Install ccache."
run: sudo apt update && sudo apt install ccache

- name: Prepare Code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -47,7 +65,9 @@ jobs:
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/cpp.sh && ci_debug
ccache --zero-stats || true
ci_cmake_build
ccache --show-stats || true
ci_cmake_package
- name: "CMake: Post"
Expand Down

0 comments on commit c0fc1bf

Please sign in to comment.