mirror of https://github.com/commaai/openpilot.git
Revert Qt MOC hacks (#29528)
* Revert "CI: prevent moc from running in cache population step (#29401)" This reverts commitd1aedccfbe
. * Revert "SCons: respect cache read only (#29437)" This reverts commit59abb469ea
. * don't change moc path
This commit is contained in:
parent
d1aedccfbe
commit
91dc8457ae
|
@ -82,8 +82,9 @@ 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
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: ${{ env.RUN }} "release/clean-cache.sh"
|
||||
run: |
|
||||
${{ env.RUN }} "rm -rf /tmp/scons_cache/* && \
|
||||
scons -j$(nproc) --cache-populate"
|
||||
- name: Save scons cache
|
||||
uses: actions/cache/save@v3
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
@ -158,8 +159,9 @@ 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 release/clean-cache.sh
|
||||
poetry run scons -j$(nproc) --cache-populate
|
||||
- name: Save scons cache
|
||||
id: scons-save-cache
|
||||
uses: actions/cache/save@v3
|
||||
|
|
|
@ -6,7 +6,6 @@ venv/
|
|||
.tags
|
||||
.ipynb_checkpoints
|
||||
.idea
|
||||
.moc_files
|
||||
.overlay_init
|
||||
.overlay_consistent
|
||||
.sconsign.dblite
|
||||
|
|
13
SConstruct
13
SConstruct
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
|
@ -336,18 +335,6 @@ qt_env['CXXFLAGS'] += qt_flags
|
|||
qt_env['LIBPATH'] += ['#selfdrive/ui']
|
||||
qt_env['LIBS'] = qt_libs
|
||||
|
||||
# Have to respect cache-readonly
|
||||
if GetOption('cache_readonly'):
|
||||
local_moc_files_dir = Dir("#.moc_files").abspath
|
||||
cache_moc_files_dir = cache_dir + "/moc_files"
|
||||
if os.path.exists(local_moc_files_dir):
|
||||
shutil.rmtree(local_moc_files_dir)
|
||||
if os.path.exists(cache_moc_files_dir):
|
||||
shutil.copytree(cache_moc_files_dir, local_moc_files_dir)
|
||||
qt_env['QT3_MOCHPREFIX'] = local_moc_files_dir + "/moc_"
|
||||
else:
|
||||
qt_env['QT3_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
if GetOption("clazy"):
|
||||
checks = [
|
||||
"level0",
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/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
|
|
@ -27,8 +27,6 @@ assets_src = "assets/assets.qrc"
|
|||
cabana_env.Command(assets, assets_src, f"rcc $SOURCES -o $TARGET")
|
||||
cabana_env.Depends(assets, Glob('/assets/*', exclude=[assets, assets_src, "assets/assets.o"]))
|
||||
|
||||
prev_moc_path = cabana_env['QT3_MOCHPREFIX']
|
||||
cabana_env['QT3_MOCHPREFIX'] = os.path.dirname(prev_moc_path) + '/cabana/moc_'
|
||||
cabana_lib = cabana_env.Library("cabana_lib", ['mainwin.cc', 'streams/pandastream.cc', 'streams/devicestream.cc', 'streams/livestream.cc', 'streams/abstractstream.cc', 'streams/replaystream.cc', 'binaryview.cc', 'historylog.cc', 'videowidget.cc', 'signalview.cc',
|
||||
'dbc/dbc.cc', 'dbc/dbcfile.cc', 'dbc/dbcmanager.cc',
|
||||
'chart/chartswidget.cc', 'chart/chart.cc', 'chart/signalselector.cc', 'chart/tiplabel.cc', 'chart/sparkline.cc',
|
||||
|
|
Loading…
Reference in New Issue