@@ -3,9 +3,6 @@ name: CMake
33on : [push, pull_request]
44
55env :
6- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7- BUILD_TYPE : RelWithDebInfo
8-
96 # Conan cache environment variables
107 CONAN_SYSREQUIRES_MODE : enabled
118 CONAN_USER_HOME : " ${{ github.workspace }}/conan-cache"
1613 name : Test docker images
1714 runs-on : ubuntu-22.04
1815 steps :
19- - uses : actions/checkout@v3
16+ - uses : actions/checkout@v4
2017
2118 - name : Build docker-ci image
2219 shell : bash
@@ -46,17 +43,18 @@ jobs:
4643 cxx : [17, 20]
4744
4845 steps :
49- - uses : actions/checkout@v3
46+ - uses : actions/checkout@v4
5047
5148 - name : Cache
52- uses : actions/cache@v3
49+ uses : actions/cache@v4
5350 env :
5451 cache-name : cache-conan-modules
5552 with :
5653 path : |
5754 ${{ env.CONAN_USER_HOME }}
5855 ~/.cache/pip
59- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
56+ ~/.ccache
57+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }}
6058
6159 - name : Install conan
6260 shell : bash
6866 run : |
6967 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
7068 sudo apt update
71- sudo apt install ninja-build ${{ matrix.compiler.pkgs }}
69+ sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache
7270 shell : bash
7371
7472 - name : Configure via CMake
@@ -100,17 +98,18 @@ jobs:
10098 cxx : [17]
10199
102100 steps :
103- - uses : actions/checkout@v3
101+ - uses : actions/checkout@v4
104102
105103 - name : Cache
106- uses : actions/cache@v3
104+ uses : actions/cache@v4
107105 env :
108106 cache-name : cache-conan-modules
109107 with :
110108 path : |
111109 ${{ env.CONAN_USER_HOME }}
112110 ~/.cache/pip
113- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
111+ ~/.ccache
112+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }}
114113
115114 - name : Install conan
116115 shell : bash
@@ -122,7 +121,7 @@ jobs:
122121 run : |
123122 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
124123 sudo apt update
125- sudo apt install ninja-build ${{ matrix.compiler.pkgs }}
124+ sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache
126125 shell : bash
127126
128127 - name : Configure via CMake
@@ -148,17 +147,18 @@ jobs:
148147 compiler : [{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15 llvm-15-dev libclang-15-dev', iwyu_branch: 'clang_15', path_prefix: "/usr/lib/llvm-15"}]
149148
150149 steps :
151- - uses : actions/checkout@v3
150+ - uses : actions/checkout@v4
152151
153152 - name : Cache
154- uses : actions/cache@v3
153+ uses : actions/cache@v4
155154 env :
156155 cache-name : cache-conan-modules
157156 with :
158157 path : |
159158 ${{ env.CONAN_USER_HOME }}
160159 ~/.cache/pip
161- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
160+ ~/.ccache
161+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }}
162162
163163 - name : Install conan
164164 shell : bash
@@ -170,7 +170,7 @@ jobs:
170170 run : |
171171 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
172172 sudo apt update
173- sudo apt install ninja-build ${{ matrix.compiler.pkgs }} cppcheck
173+ sudo apt install ninja-build ${{ matrix.compiler.pkgs }} cppcheck ccache
174174 shell : bash
175175
176176 - name : Compile and install IWYU
@@ -204,17 +204,18 @@ jobs:
204204 buildtype : [debug, release]
205205
206206 steps :
207- - uses : actions/checkout@v3
207+ - uses : actions/checkout@v4
208208
209209 - name : Cache
210- uses : actions/cache@v3
210+ uses : actions/cache@v4
211211 env :
212212 cache-name : cache-conan-modules
213213 with :
214214 path : |
215215 ${{ env.CONAN_USER_HOME }}
216216 ~/.cache/pip
217- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
217+ ~/.ccache
218+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('cmake/Conan.cmake') }}
218219
219220 - name : Install conan
220221 shell : bash
@@ -225,7 +226,7 @@ jobs:
225226 - name : Install dependencies
226227 run : |
227228 sudo apt update
228- sudo apt install ninja-build wget
229+ sudo apt install ninja-build wget ccache
229230 shell : bash
230231
231232 - name : Install GCC ARM
@@ -254,17 +255,18 @@ jobs:
254255 compiler : [ {name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'} ]
255256
256257 steps :
257- - uses : actions/checkout@v3
258+ - uses : actions/checkout@v4
258259
259260 - name : Cache
260- uses : actions/cache@v3
261+ uses : actions/cache@v4
261262 env :
262263 cache-name : cache-conan-modules
263264 with :
264265 path : |
265266 ${{ env.CONAN_USER_HOME }}
266267 ~/.cache/pip
267- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
268+ ~/.ccache
269+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('cmake/Conan.cmake') }}
268270
269271 - name : Install conan
270272 shell : bash
@@ -276,7 +278,7 @@ jobs:
276278 run : |
277279 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
278280 sudo apt update
279- sudo apt install ninja-build ${{ matrix.compiler.pkgs }}
281+ sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache
280282 shell : bash
281283
282284 - name : Configure via CMake
@@ -298,17 +300,18 @@ jobs:
298300 cxx : [20]
299301
300302 steps :
301- - uses : actions/checkout@v3
303+ - uses : actions/checkout@v4
302304
303305 - name : Cache
304- uses : actions/cache@v3
306+ uses : actions/cache@v4
305307 env :
306308 cache-name : cache-conan-modules
307309 with :
308310 path : |
309311 ${{ env.CONAN_USER_HOME }}
310312 ~/.cache/pip
311- key : ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
313+ ~/.ccache
314+ key : ${{ runner.os }}-${{ matrix.buildtype }}-${{ hashFiles('cmake/Conan.cmake') }}
312315
313316 - name : Install conan
314317 shell : bash
@@ -320,7 +323,7 @@ jobs:
320323 run : |
321324 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
322325 sudo apt update
323- sudo apt install ninja-build ${{ matrix.compiler.pkgs }} libx11-xcb-dev libfontenc-dev libice-dev \
326+ sudo apt install ninja-build ccache ${{ matrix.compiler.pkgs }} libx11-xcb-dev libfontenc-dev libice-dev \
324327 libsm-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxi-dev \
325328 libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev \
326329 libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev libxcb-render0-dev libxcb-render-util0-dev \
0 commit comments