Skip to content

Commit

Permalink
Revert Qt MOC hacks (#29528)
Browse files Browse the repository at this point in the history
* Revert "CI: prevent moc from running in cache population step (#29401)"

This reverts commit d1aedcc.

* Revert "SCons: respect cache read only (#29437)"

This reverts commit 59abb46.

* don't change moc path
  • Loading branch information
adeebshihadeh authored Aug 22, 2023
1 parent d1aedcc commit 91dc845
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ venv/
.tags
.ipynb_checkpoints
.idea
.moc_files
.overlay_init
.overlay_consistent
.sconsign.dblite
Expand Down
13 changes: 0 additions & 13 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import shutil
import subprocess
import sys
import sysconfig
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 0 additions & 16 deletions release/clean-cache.sh

This file was deleted.

2 changes: 0 additions & 2 deletions tools/cabana/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 91dc845

Please sign in to comment.