mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-15 08:17:05 +00:00
ci: cache fairmq compilation with ccache
FairMQ's own sources (library, examples, tests) were recompiled from scratch in every matrix job on every push. - add hendrikmuhs/ccache-action to build, sanitizers and static-analysis jobs - set CMAKE_C/CXX_COMPILER_LAUNCHER=ccache so cmake routes through it - key the cache per (job, env, gcc) since ccache hashes the compiler
This commit is contained in:
committed by
Dennis Klein
parent
1186bda040
commit
ffc9c60f73
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@@ -36,6 +36,12 @@ jobs:
|
|||||||
gcc: ${{ matrix.gcc }}
|
gcc: ${{ matrix.gcc }}
|
||||||
env: ${{ matrix.env }}
|
env: ${{ matrix.env }}
|
||||||
|
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.job }}-${{ matrix.env }}-gcc${{ matrix.gcc }}
|
||||||
|
max-size: 500M
|
||||||
|
|
||||||
- name: Configure and Build
|
- name: Configure and Build
|
||||||
uses: threeal/cmake-action@v2
|
uses: threeal/cmake-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -44,6 +50,8 @@ jobs:
|
|||||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
|
CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
|
||||||
BUILD_TESTING=ON
|
BUILD_TESTING=ON
|
||||||
|
CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
|
CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: threeal/ctest-action@v1
|
uses: threeal/ctest-action@v1
|
||||||
@@ -83,6 +91,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
gcc: '14'
|
gcc: '14'
|
||||||
|
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.job }}-${{ matrix.sanitizer.name }}
|
||||||
|
max-size: 500M
|
||||||
|
|
||||||
- name: Configure and Build
|
- name: Configure and Build
|
||||||
uses: threeal/cmake-action@v2
|
uses: threeal/cmake-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -92,6 +106,8 @@ jobs:
|
|||||||
options: |
|
options: |
|
||||||
CMAKE_BUILD_TYPE=Debug
|
CMAKE_BUILD_TYPE=Debug
|
||||||
BUILD_TESTING=ON
|
BUILD_TESTING=ON
|
||||||
|
CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
|
CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
${{ matrix.sanitizer.options }}
|
${{ matrix.sanitizer.options }}
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
@@ -116,6 +132,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
gcc: '14'
|
gcc: '14'
|
||||||
|
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.job }}
|
||||||
|
max-size: 500M
|
||||||
|
|
||||||
- name: Configure and Build
|
- name: Configure and Build
|
||||||
uses: threeal/cmake-action@v2
|
uses: threeal/cmake-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -124,6 +146,8 @@ jobs:
|
|||||||
CMAKE_BUILD_TYPE=Debug
|
CMAKE_BUILD_TYPE=Debug
|
||||||
BUILD_TESTING=ON
|
BUILD_TESTING=ON
|
||||||
RUN_STATIC_ANALYSIS=ON
|
RUN_STATIC_ANALYSIS=ON
|
||||||
|
CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
|
CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
- name: Check for warnings
|
- name: Check for warnings
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user