diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 24278af21b..be3324457a 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -15,7 +15,7 @@ env: docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true docker build --cache-from $DOCKER_REGISTRY/$BASE_IMAGE:latest -t $DOCKER_REGISTRY/$BASE_IMAGE:latest -t $BASE_IMAGE:latest -f Dockerfile.openpilot_base . - RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e SCONS_CACHE=1 -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v /tmp/scons_cache:/tmp/scons_cache -v /tmp/comma_download_cache:/tmp/comma_download_cache $BASE_IMAGE /bin/sh -c + RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v /tmp/scons_cache:/tmp/scons_cache -v /tmp/comma_download_cache:/tmp/comma_download_cache $BASE_IMAGE /bin/sh -c UNIT_TEST: coverage run --append -m unittest discover jobs: diff --git a/Jenkinsfile b/Jenkinsfile index 127051fa8d..eca4f6d0a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -127,7 +127,7 @@ pipeline { stage('Devel Tests') { steps { phone_steps("eon-build", [ - ["build devel", "cd release && SCONS_CACHE=1 DEVEL_TEST=1 ./build_devel.sh"], + ["build devel", "cd release && DEVEL_TEST=1 ./build_devel.sh"], ["test manager", "python selfdrive/manager/test/test_manager.py"], ["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"], ["test car interfaces", "cd selfdrive/car/tests/ && ./test_car_interfaces.py"], @@ -166,7 +166,7 @@ pipeline { timeout(time: 90, unit: 'MINUTES') { sh script: "/home/batman/tools/zookeeper/enable_and_wait.py $device_ip 120", label: "turn on device" phone(device_ip, "git checkout", readFile("selfdrive/test/setup_device_ci.sh"),) - phone(device_ip, "build", "SCONS_CACHE=1 scons -j4 && sync") + phone(device_ip, "build", "scons -j4 && sync") sh script: "/home/batman/tools/zookeeper/disable.py $device_ip", label: "turn off device" sh script: "/home/batman/tools/zookeeper/enable_and_wait.py $device_ip 120", label: "turn on device" sh script: "/home/batman/tools/zookeeper/check_consumption.py 60 3", label: "idle power consumption after boot" diff --git a/SConstruct b/SConstruct index d0ddc62b14..6b7905bfc5 100644 --- a/SConstruct +++ b/SConstruct @@ -223,13 +223,10 @@ env = Environment( if GetOption('compile_db'): env.CompilationDatabase('compile_commands.json') -if os.environ.get('SCONS_CACHE'): - cache_dir = '/tmp/scons_cache' - if TICI: - cache_dir = '/data/scons_cache' - - CacheDir(cache_dir) - Clean(["."], cache_dir) +# Setup cache dir +cache_dir = '/data/scons_cache' if TICI else '/tmp/scons_cache' +CacheDir(cache_dir) +Clean(["."], cache_dir) node_interval = 5 node_count = 0 diff --git a/release/build_release2.sh b/release/build_release2.sh index fe4936913f..ee3c3f4656 100755 --- a/release/build_release2.sh +++ b/release/build_release2.sh @@ -49,7 +49,7 @@ popd # Build stuff ln -sfn /data/openpilot /data/pythonpath export PYTHONPATH="/data/openpilot:/data/openpilot/pyextra" -SCONS_CACHE=1 scons -j3 +scons -j3 # Run tests python selfdrive/manager/test/test_manager.py diff --git a/release/build_release3.sh b/release/build_release3.sh index 4c72eff47e..1a3879103a 100755 --- a/release/build_release3.sh +++ b/release/build_release3.sh @@ -65,7 +65,7 @@ popd # Build export PYTHONPATH="$BUILD_DIR" -SCONS_CACHE=1 scons -j$(nproc) +scons -j$(nproc) # Run tests #python selfdrive/manager/test/test_manager.py diff --git a/selfdrive/manager/build.py b/selfdrive/manager/build.py index bda4ab8a1f..5d6f008ef3 100755 --- a/selfdrive/manager/build.py +++ b/selfdrive/manager/build.py @@ -25,7 +25,6 @@ PREBUILT = os.path.exists(os.path.join(BASEDIR, 'prebuilt')) def build(spinner, dirty=False): env = os.environ.copy() env['SCONS_PROGRESS'] = "1" - env['SCONS_CACHE'] = "1" nproc = os.cpu_count() j_flag = "" if nproc is None else f"-j{nproc - 1}"