Skip to content

Commit 80cf2c5

Browse files
authored
Merge pull request #647 from frstrtr/ci-steward/conan-orphan-download-cleanup
ci(coin-matrix): clear orphaned conan download tempfiles on self-hosted
2 parents 465ded9 + b303d47 commit 80cf2c5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/coin-matrix.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ jobs:
8989
if: steps.presence.outputs.exists == '1' && runner.environment != 'github-hosted'
9090
run: rm -rf build_${{ matrix.coin }}
9191

92+
- name: Clear orphaned Conan download tempfiles (self-hosted cache is reused)
93+
if: steps.presence.outputs.exists == '1' && runner.environment != 'github-hosted'
94+
# An interrupted or racing conan download can leave a partial conan_package.tgz
95+
# in ~/.conan2 that makes the next `conan install` abort with
96+
# "the file to download already exists". Delete these staging archives so a
97+
# missing binary package can be re-fetched cleanly; extracted packages are untouched.
98+
run: |
99+
find ~/.conan2/p -type f \( -name 'conan_package.tgz' -o -name 'conan_sources.tgz' \) -delete 2>/dev/null || true
100+
92101
- name: Conan install
93102
if: steps.presence.outputs.exists == '1'
94103
run: |

0 commit comments

Comments
 (0)