Skip to content

Commit c71ff46

Browse files
baerwangwangxiaoxiong
andauthored
fix: ci cache use two deps (#2109)
Co-authored-by: wangxiaoxiong <[email protected]>
1 parent 8ed1123 commit c71ff46

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/pika.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ jobs:
120120
source /opt/rh/devtoolset-10/enable
121121
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address
122122
123+
- uses: actions/cache@v3
124+
with:
125+
path: ${{ github.workspace }}/deps
126+
key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }}
127+
128+
- uses: actions/cache@v3
129+
with:
130+
path: ${{ github.workspace }}/buildtrees
131+
key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }}
132+
123133
- name: Build
124134
run: |
125135
source /opt/rh/devtoolset-10/enable
@@ -168,6 +178,16 @@ jobs:
168178
export CC=/usr/local/opt/gcc@10/bin/gcc-10
169179
cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address
170180
181+
- uses: actions/cache@v3
182+
with:
183+
path: ${{ github.workspace }}/deps
184+
key: ${{ runner.os }}-deps-${{ hashFiles('**/CMakeLists.txt') }}
185+
186+
- uses: actions/cache@v3
187+
with:
188+
path: ${{ github.workspace }}/buildtrees
189+
key: ${{ runner.os }}-buildtrees-${{ hashFiles('**/CMakeLists.txt') }}
190+
171191
- name: Build
172192
run: |
173193
cmake --build build --config ${{ env.BUILD_TYPE }}
@@ -227,4 +247,3 @@ jobs:
227247
push: false
228248
tags: ${{ steps.meta.outputs.tags }}
229249
labels: ${{ steps.meta.outputs.labels }}
230-

0 commit comments

Comments
 (0)