Skip to content

Commit e4dcf60

Browse files
authored
Merge branch 'commaai:master' into master
2 parents 5408af4 + 23b15a7 commit e4dcf60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2123
-330
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Car bug report
2+
description: For issues with a particular car make or model
3+
labels: ["car", "bug"]
4+
body:
5+
6+
- type: markdown
7+
attributes:
8+
value: >
9+
Before creating a **car bug report**, please check the following:
10+
* If the issue likely isn't specific to your car model or make, go back and open an **openpilot bug report** instead.
11+
* If the issue is related to the driving or driver monitoring models, you should open a [discussion](https://github.com/commaai/openpilot/discussions/categories/model-feedback) instead.
12+
* If you are fingerprinting your car, refer to the [fingerprinting guide](https://github.com/commaai/openpilot/wiki/Fingerprinting) or visit the [community Discord server](https://discord.comma.ai) to request help.
13+
* If you are inquiring about future car support, check the [community Discord server](https://discord.comma.ai) for progress on your vehicle and help contribute. Issues simply requesting support for new vehicles will be closed.
14+
* Ensure you're running the latest openpilot release.
15+
* Ensure you're using officially supported hardware.
16+
* Ensure there isn't an existing issue for your bug. If there is, leave a comment on the existing issue.
17+
* Ensure you're running stock openpilot. We cannot look into bug reports from forks.
18+
19+
If you're unsure whether you've hit a bug, check out the #installation-help channel in the [community Discord server](https://discord.comma.ai).
20+
21+
- type: textarea
22+
attributes:
23+
label: Describe the car bug
24+
description: Also include a description of how to reproduce the bug
25+
validations:
26+
required: true
27+
28+
- type: input
29+
id: route
30+
attributes:
31+
label: Provide a route where the issue occurs
32+
description: Ensure the route is fully uploaded at https://useradmin.comma.ai. We cannot look into issues without routes, or at least a Dongle ID.
33+
placeholder: 77611a1fac303767|2020-05-11--16-37-07
34+
validations:
35+
required: true
36+
37+
- type: input
38+
id: version
39+
attributes:
40+
label: openpilot version
41+
description: If you're not on release, provide the commit hash
42+
placeholder: 0.8.10
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
attributes:
48+
label: Additional info
49+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: openpilot bug report
4+
url: https://github.com/commaai/openpilot/issues/new
5+
about: For issues not limited to a particular car make or model, e.g. driving model performance or issues with your comma device.
6+
- name: Join the Discord
7+
url: https://discord.comma.ai
8+
about: The community Discord is for both car port development and experience discussion
9+
- name: Report driving behavior feedback
10+
url: https://discord.com/channels/469524606043160576/1254834193066623017
11+
about: Feedback for the driving and driver monitoring models goes in the #driving-feedback in Discord
12+
- name: Community Wiki
13+
url: https://github.com/commaai/openpilot/wiki
14+
about: Check out our community wiki

.github/workflows/car_diff.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: car diff
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
comment:
9+
name: comment
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
continue-on-error: true
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
actions: read
17+
steps:
18+
- name: Wait for car diff
19+
uses: lewagon/wait-on-check-action@v1.3.4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
check-name: car diff
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
allowed-conclusions: success
25+
wait-interval: 20
26+
- name: Download car diff
27+
uses: dawidd6/action-download-artifact@v6
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
workflow: tests.yml
31+
workflow_conclusion: ''
32+
pr: ${{ github.event.number }}
33+
name: car_diff_${{ github.event.number }}
34+
path: .
35+
allow_forks: true
36+
- name: Comment car diff on PR
37+
uses: thollander/actions-comment-pull-request@v2
38+
with:
39+
filePath: diff.txt
40+
comment_tag: car_diff
41+
pr_number: ${{ github.event.number }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,25 @@ jobs:
2828
safety_tests:
2929
name: safety
3030
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
31-
strategy:
32-
fail-fast: false
33-
matrix:
34-
flags: ['--ubsan']
3531
steps:
3632
- uses: commaai/timeout@v1
3733
with:
3834
timeout: ${{ github.repository == 'commaai/opendbc' && '60' || '999' }}
3935
- uses: actions/checkout@v4
4036
- uses: ./.github/workflows/cache
4137
- name: Run safety tests
42-
run: ./opendbc/safety/tests/test.sh ${{ matrix.flags }}
38+
run: ./opendbc/safety/tests/test.sh
4339

4440
mutation:
4541
name: Safety mutation tests
46-
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
42+
runs-on: ${{ matrix.os }}
4743
timeout-minutes: 45
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
include:
48+
- os: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
49+
- os: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-macos-8x14' || 'macos-latest' }}
4850
env:
4951
GIT_REF: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event.before || format('origin/{0}', github.event.repository.default_branch) }}
5052
steps:
@@ -58,6 +60,53 @@ jobs:
5860
scons -j8
5961
cd opendbc/safety/tests && ./mutation.sh
6062
63+
car_diff:
64+
name: car diff
65+
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
66+
env:
67+
GIT_REF: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event.before || format('origin/{0}', github.event.repository.default_branch) }}
68+
steps:
69+
- uses: actions/checkout@v4
70+
with:
71+
fetch-depth: 0
72+
- uses: ./.github/workflows/cache
73+
- name: Build opendbc
74+
run: |
75+
source setup.sh
76+
scons -j8
77+
- name: Test car diff
78+
if: github.event_name == 'pull_request'
79+
run: source setup.sh && python opendbc/car/tests/car_diff.py | tee diff.txt
80+
- name: Upload diff
81+
if: always() && github.event_name == 'pull_request'
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: car_diff_${{ github.event.number }}
85+
path: diff.txt
86+
- name: Update refs
87+
if: github.repository == 'commaai/opendbc' && github.ref == 'refs/heads/master'
88+
run: source setup.sh && python opendbc/car/tests/car_diff.py --update-refs
89+
- name: Checkout ci-artifacts
90+
if: github.repository == 'commaai/opendbc' && github.ref == 'refs/heads/master'
91+
uses: actions/checkout@v4
92+
with:
93+
repository: commaai/ci-artifacts
94+
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
95+
path: ${{ github.workspace }}/ci-artifacts
96+
- name: Push refs
97+
if: github.repository == 'commaai/opendbc' && github.ref == 'refs/heads/master'
98+
working-directory: ${{ github.workspace }}/ci-artifacts
99+
run: |
100+
ls ${{ github.workspace }}/car_diff/*.zst 2>/dev/null || exit 0
101+
git config user.name "GitHub Actions Bot"
102+
git config user.email "<>"
103+
git fetch origin car_diff || true
104+
git checkout car_diff 2>/dev/null || git checkout --orphan car_diff
105+
cp ${{ github.workspace }}/car_diff/*.zst .
106+
git add *.zst
107+
git commit -m "car_diff refs for ${{ github.sha }}" || echo "No changes to commit"
108+
git push origin car_diff
109+
61110
# TODO: this needs to move to opendbc
62111
test_models:
63112
name: test models
@@ -69,7 +118,7 @@ jobs:
69118
env:
70119
BASE_IMAGE: openpilot-base
71120
BUILD: selfdrive/test/docker_build.sh base
72-
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
121+
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=default -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
73122
PYTEST: pytest --continue-on-collection-errors --durations=0 --durations-min=5 -n logical
74123
steps:
75124
- uses: actions/checkout@v4

.github/workflows/update-cppcheck.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
- name: Get latest cppcheck version
1818
id: version
1919
run: |
20-
LATEST=$(curl -fsSL https://api.github.com/repos/danmar/cppcheck/releases/latest | jq -r .tag_name)
20+
# Tags are sorted by time (newest first), so get the first version-like tag
21+
LATEST=$(curl -fsSL "https://api.github.com/repos/danmar/cppcheck/tags?per_page=20" | \
22+
jq -r '.[].name' | \
23+
grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' | \
24+
head -n 1)
2125
echo "vers=$LATEST" >> "$GITHUB_OUTPUT"
2226
- name: Update VERS in install.sh
2327
run: |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update uv.lock
2+
3+
on:
4+
schedule:
5+
- cron: "0 14 * * 1" # every Monday at 2am UTC (6am PST)
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-uv-lock:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: astral-sh/setup-uv@v5
17+
- name: Update uv.lock
18+
run: uv lock --upgrade
19+
- name: Create Pull Request
20+
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
21+
with:
22+
author: Vehicle Researcher <user@comma.ai>
23+
token: ${{ secrets.ACTIONS_CREATE_PR_PAT }}
24+
commit-message: "[bot] Update uv.lock"
25+
title: "[bot] Update uv.lock"
26+
body: "Weekly update of uv.lock dependencies"
27+
branch: "update-uv-lock"
28+
base: "master"
29+
delete-branch: true
30+
labels: bot

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.cache/
22
/build/
3-
.mypy_cache/
43
*.pyc
54
*.os
65
*.o
@@ -18,7 +17,6 @@
1817
*.gcno
1918
*.dump
2019
*.gcov
21-
uv.lock
2220
/dist/
2321
.vscode/
2422
__pycache__/
@@ -33,3 +31,4 @@ cppcheck-addon-ctu-file-list
3331
opendbc/safety/tests/coverage-out
3432

3533
compile_commands.json
34+
.mull/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The above tests are themselves tested by:
138138
* a [mutation test](opendbc/safety/tests/misra/test_mutation.py) on the MISRA coverage
139139
* 100% line coverage enforced on the safety unit tests
140140

141-
In addition, we run the [ruff linter](https://github.com/astral-sh/ruff) and [mypy](https://mypy-lang.org/) on the car interface library.
141+
In addition, we run the [ruff linter](https://github.com/astral-sh/ruff) and [ty](https://github.com/astral-sh/ty) on the car interface library.
142142

143143
### Bounties
144144

SConstruct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ AddOption('--minimal',
44
default=True,
55
help='the minimum build. no tests, tools, etc.')
66

7-
AddOption('--ubsan',
8-
action='store_true',
9-
help='turn on UBSan')
10-
117
SConscript(['SConscript'])

0 commit comments

Comments
 (0)