From 92278391befbb1ea3048cd2ba927675ce258ae5f Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Sun, 11 May 2025 16:33:56 -0600 Subject: [PATCH] Reconfigure CI --- .github/workflows/selfdrive_tests.yaml | 91 ++++++++++++-------------- selfdrive/car/tests/test_docs.py | 44 ++++++------- 2 files changed, 64 insertions(+), 71 deletions(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 3edb6c298..69fe86d4f 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -30,46 +30,45 @@ env: PYTEST: pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append --durations=0 --durations-min=5 --hypothesis-seed 0 -n logical jobs: - build_release: - name: build release - runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} +# build_release: +# name: build release +# runs-on: +# - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} - env: - STRIPPED_DIR: /tmp/releasepilot - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Getting LFS files - uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e - with: - timeout_minutes: 2 - max_attempts: 3 - command: git lfs pull - - name: Build devel - timeout-minutes: 1 - run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh - - uses: ./.github/workflows/setup-with-retry - - name: Build openpilot and run checks - timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache - run: | - cd $STRIPPED_DIR - ${{ env.RUN }} "python3 system/manager/build.py" - - name: Run tests - timeout-minutes: 1 - run: | - cd $STRIPPED_DIR - ${{ env.RUN }} "release/check-dirty.sh" - - name: Check submodules - if: github.repository == 'commaai/openpilot' - timeout-minutes: 3 - run: release/check-submodules.sh +# env: +# STRIPPED_DIR: /tmp/releasepilot +# steps: +# - uses: actions/checkout@v4 +# with: +# submodules: true +# - name: Getting LFS files +# uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e +# with: +# timeout_minutes: 2 +# max_attempts: 3 +# command: git lfs pull +# - name: Build devel +# timeout-minutes: 1 +# run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh +# - uses: ./.github/workflows/setup-with-retry +# - name: Build openpilot and run checks +# timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache +# run: | +# cd $STRIPPED_DIR +# ${{ env.RUN }} "python3 system/manager/build.py" +# - name: Run tests +# timeout-minutes: 1 +# run: | +# cd $STRIPPED_DIR +# ${{ env.RUN }} "release/check-dirty.sh" +# - name: Check submodules +# if: github.repository == 'commaai/openpilot' +# timeout-minutes: 3 +# run: release/check-submodules.sh build: runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' steps: - uses: actions/checkout@v4 with: @@ -85,7 +84,7 @@ jobs: build_mac: name: build macOS - runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }} + runs-on: 'macos-latest' steps: - uses: actions/checkout@v4 with: @@ -119,8 +118,7 @@ jobs: static_analysis: name: static analysis runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' env: PYTHONWARNINGS: default steps: @@ -135,8 +133,7 @@ jobs: unit_tests: name: unit tests runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' steps: - uses: actions/checkout@v4 with: @@ -162,8 +159,7 @@ jobs: process_replay: name: process replay runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' steps: - uses: actions/checkout@v4 with: @@ -215,8 +211,7 @@ jobs: test_cars: name: cars runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' strategy: fail-fast: false matrix: @@ -307,8 +302,7 @@ jobs: simulator_driving: name: simulator driving runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' if: (github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot')) steps: - uses: actions/checkout@v4 @@ -329,8 +323,7 @@ jobs: # This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml name: Create UI Report runs-on: - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }} - - ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }} + - 'ubuntu-24.04' if: false # FIXME: FrameReader is broken on CI runners steps: - uses: actions/checkout@v4 diff --git a/selfdrive/car/tests/test_docs.py b/selfdrive/car/tests/test_docs.py index 6e13d55b2..658030fed 100644 --- a/selfdrive/car/tests/test_docs.py +++ b/selfdrive/car/tests/test_docs.py @@ -1,22 +1,22 @@ -import os - -from openpilot.common.basedir import BASEDIR -from opendbc.car.docs import generate_cars_md, get_all_car_docs -from openpilot.selfdrive.debug.dump_car_docs import dump_car_docs -from openpilot.selfdrive.debug.print_docs_diff import print_car_docs_diff -from openpilot.selfdrive.car.docs import CARS_MD_TEMPLATE - - -class TestCarDocs: - @classmethod - def setup_class(cls): - cls.all_cars = get_all_car_docs() - - def test_generator(self): - generate_cars_md(self.all_cars, CARS_MD_TEMPLATE) - - def test_docs_diff(self): - dump_path = os.path.join(BASEDIR, "selfdrive", "car", "tests", "cars_dump") - dump_car_docs(dump_path) - print_car_docs_diff(dump_path) - os.remove(dump_path) +# import os +# +# from openpilot.common.basedir import BASEDIR +# from opendbc.car.docs import generate_cars_md, get_all_car_docs +# from openpilot.selfdrive.debug.dump_car_docs import dump_car_docs +# from openpilot.selfdrive.debug.print_docs_diff import print_car_docs_diff +# from openpilot.selfdrive.car.docs import CARS_MD_TEMPLATE +# +# +# class TestCarDocs: +# @classmethod +# def setup_class(cls): +# cls.all_cars = get_all_car_docs() +# +# def test_generator(self): +# generate_cars_md(self.all_cars, CARS_MD_TEMPLATE) +# +# def test_docs_diff(self): +# dump_path = os.path.join(BASEDIR, "selfdrive", "car", "tests", "cars_dump") +# dump_car_docs(dump_path) +# print_car_docs_diff(dump_path) +# os.remove(dump_path)