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
old-commit-hash: d1aedccfbe
beeps
parent
c7a05f82e0
commit
0c17a4f4d0
2 changed files with 19 additions and 5 deletions
@ -0,0 +1,16 @@ |
||||
#!/usr/bin/env bash |
||||
set -e |
||||
|
||||
# delete outdated moc files |
||||
scons --dry-run --taskmastertrace /tmp/tasktrace.log >/dev/null |
||||
MOC_EXISTING_PROD="$(find /tmp/scons_cache/moc_files -type f | sort)" |
||||
MOC_CURRENT_PROD="$(egrep -o "'[^']*moc_files[^']*'" /tmp/tasktrace.log | sed "s/'//g" | sort | uniq)" |
||||
MOC_JUNK="$(comm -23 <(echo "$MOC_EXISTING_PROD") <(echo "$MOC_CURRENT_PROD"))" |
||||
echo "$MOC_JUNK" | xargs -I{} rm {} |
||||
rm /tmp/tasktrace.log |
||||
|
||||
# delete cache except for moc files |
||||
rm -rf $(find /tmp/scons_cache -maxdepth 1 ! -name moc_files ! -name scons_cache) |
||||
|
||||
# repopulate cache |
||||
scons --dry-run --cache-populate >/dev/null |
Loading…
Reference in new issue