CI: prevent moc from running in cache population step (#29401)

* Do not remove moc_files from cache

* Add cache cleanup script

* Use cache cleanup script

* Dry-run in cache population command

* Add newline

* Temporarly disable master only constraint for cache cleanup step

* Add test lines

* one more

* Fix shebang

* Remove debug lines

* Bring back master branch constraints
This commit is contained in:
Kacper Rączy
2023-08-22 10:47:56 -07:00
committed by GitHub
parent c5c73c4ddb
commit d1aedccfbe
2 changed files with 19 additions and 5 deletions

View File

@@ -82,9 +82,8 @@ jobs:
run: ${{ env.RUN }} "scons -j$(nproc) --extras && release/check-dirty.sh"
- name: Cleanup scons cache and rebuild
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 2 || 30) }} # allow more time when we missed the scons cache
run: |
${{ env.RUN }} "rm -rf /tmp/scons_cache/* && \
scons -j$(nproc) --cache-populate"
if: github.ref == 'refs/heads/master'
run: ${{ env.RUN }} "release/clean-cache.sh"
- name: Save scons cache
uses: actions/cache/save@v3
if: github.ref == 'refs/heads/master'
@@ -159,9 +158,8 @@ jobs:
- name: Pre Cache - Cleanup scons cache
if: github.ref == 'refs/heads/master'
run: |
rm -rf /tmp/scons_cache/*
eval "$(pyenv init --path)"
poetry run scons -j$(nproc) --cache-populate
poetry run release/clean-cache.sh
- name: Save scons cache
id: scons-save-cache
uses: actions/cache/save@v3