Skip to content

Commit

Permalink
working "travis:" for dp (dragonpilot-community#90)
Browse files Browse the repository at this point in the history
* Create main.yml

* test files

* tools and test files

* docker file

* mac_setup.sh

* no widget

* add external

* more stuff for action

* laika

* not needed

* pc model

* new from comma

* update the path

* form master

* more changes from master

* fix for unit test.

* fix for webcam test.

* needed

* typo

* add yuv

* force libyuv

* add all phonelibs

* Create __init__.py

* Add dp files

* remove process replay

* Remove unused import

* Update main.yml

* make exec

* add oo_params

* no Golf in DP

* add common/travis_checker.py

* fix for github actions

* add panda tests

* init dp_last_modified

* revert

* fix for github actions

* missing has_relay for chrysler

* fix for github action

* readd total_ordering to the events.

* add window.py from master

* add extra geeras

* why?

* init init_params_vals if dp_last_modified does not exsist

* dp does not use internet Connectivity check

* test

* 'from' to explicitly chain exceptions and remove unused r_name.

* we dont need macos and webcame test useless for us

* indent

* clean up, deprecate bare except.

* clean up appd.py

* break it apart

* display startup event based of branch.

* unsed import

* clean up

* needed as its definded.

* clean up mapd

* not needed.

* usless

* not needed.

* add colors.py to release file

* disable dangerous-default-value

* add i18n to release

* has_relay

* add dynamic gas to release

* forgot the file extension

* has_relay

* add dynamic follow to relese file .

* forgot to d

* make dir if they do not exist

* Update dp_common.py

* Update dp_common.py

* fix longitudinal test for github actions

* Update lane_planner.py

* fix for speedTooHigh in github actions

* add print_dead_and_not_valid

* print problems

* Update systemd.py

* systemd must also be running for long DP test

* print

* print

* syntax

* Update params.cc

* syntax

* Update params.cc

* Update systemd.py

* print param/d directory

* import floor

* make string

* Update systemd.py

* ignore_alive 'dragonConf'

* fix test car models

* Update test_models.py

* disable pointless-sting statements for default_speeds_generator.py

* init self.sm

* w0105

* add overpy to docker

* install overpy

* clean up mapd

* add mypy

* no need blacklash between bracket

* syntax

* action says we do not need it

* defined twice

* pylint line to big

* can i stack them ?

* clean up mapd_helpers.

* no backlash in brackets

* i cant stack them

* Update test_models.py

* Update test_models.py

* fix E501

* E701

* stack them like this?

* e501

* update non_tested_cars

* Update mapd.py

* update thermald.

* update lane_planner.

* update lane_planner

* update thermald.

* update mapd

* update df

* update uploader

* force boolean

* more bools

* E501

* Update mapd.py

* skip

* add sm['dragonConf']

* Update mapd.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update mapd.py

* update type to type_of

* Update mapd.py

* Update uploader.py

* Update __init__.py

* Update thermald.py

* Update lane_planner.py

* Update mapd.py

* Update test_car_models.py

* from master

* update parser

* from master

* Update systemd.py

* Update dp_common.py

* Update dp_common.py

* rename COLORS to COLOURS

* Update support.py

* Update support.py

* Update systemd.py

* Update test_car_models.py

* add can tests

* Update test_models.py

* Update carstate.py

* Update vw_golf_mk4.dbc

* Update values.py

* Update test_models.py

* Update parser.cc

* try only one FP

* Update parser.cc

* Update carstate.py

* Update vw_golf_mk4.dbc

* Update vw_mqb_2010.dbc

* Update values.py

* Update values.py

* Update carcontroller.py

* Update carstate.py

* Update vw_mqb_2010.dbc

* Update vw_golf_mk4.dbc

* Update carstate.py

* Update vw_golf_mk4.dbc

* Update carstate.py

* Update volkswagencan.py

* update vw

* default

* Update volkswagencan.py

* skip vw

* skip df

* mypy ignore df support

* update thermald.

* import datetime

* added twice.

* fix for mapd.

* indi BPv (commaai#751)

* Update car.capnp

* Update interface.py

* Update latcontrol_indi.py

* Update interface.py

* Update interface.py

* clean up

* clean up

* Update interface.py

* Update interface.py

* Update values.py

* Create toyota_nodsu_pt_generated_rav4.dbc

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>

* live indi tunning.

* dynamic gas

* minor improv

* sparrowtune

* If car in blindspot while changing lanes abort

* If steering against auto lane change cancel lane change

* refined INDI tunes for RAV4TSS2 and tss2 prius

* travis = true default.

* send username.

* line toolong

* for backup.

* test for indi tune

* will this wokr

* 081 model

* on the fly.

* tune

* i want smoother accel.

* updated message.

* ingore mypy

* this could be it

* revert for now.

* faster ci

* noqa ope_edit

* revert vw

* pylint skip

* fix vw

* revert back to this moring. need to redo the new changes

* `self` not car_params. lol

* we do not use process_replay just as of yet.

* fix for indi test

* this will give us car model test check.

* make vw communityfeature to pass the test?

* cp for indi test

* no test for GENERICPQ

* how about the other way around?

* Update files_common

* Update files_common

* Update files_common

* Update files_common

* Update files_common

* Update files_common

* fix for mapd.

* smp_pipenv (commaai#19687)

* planner.py: flake8 # noqa: E501

* remove docker tests.

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: arne182 <arneschwarck@gmail.com>
Co-authored-by: Kumar <rav4kumar@users.noreply.github.com>
Co-authored-by: cgw1968-5779 <58063525+cgw1968-5779@users.noreply.github.com>
Co-authored-by: James Carroll <jamcar23@gmail.com>
Co-authored-by: SCshredder17 <57152954+SCshredder17@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
  • Loading branch information
9 people authored Jan 7, 2021
1 parent 49dd055 commit c65fe59
Show file tree
Hide file tree
Showing 1,333 changed files with 367,175 additions and 2,446 deletions.
164 changes: 164 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: kumar's testing_closet
on:
push:
branches-ignore:
- 'testing-closet*'
pull_request:

env:
BASE_IMAGE: openpilot-base
DOCKER_REGISTRY: ghcr.io/commaai

DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }}
BUILD: |
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true
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 -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/comma_download_cache:/tmp/comma_download_cache $BASE_IMAGE /bin/sh -c
UNIT_TEST: coverage run --append -m unittest discover

jobs:
build_release:
name: build release
runs-on: ubuntu-20.04
timeout-minutes: 50
env:
STRIPPED_DIR: tmppilot
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Strip non-release files
run: |
mkdir $STRIPPED_DIR
cp -pR --parents $(cat release/files_common) $STRIPPED_DIR
cp Dockerfile.openpilot_base $STRIPPED_DIR
# need this to build on x86
cp -pR --parents phonelibs/libyuv phonelibs/snpe selfdrive/modeld/runners $STRIPPED_DIR
- name: Build Docker image
run: eval "$BUILD"
- name: Build openpilot and run checks
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "cd /tmp/openpilot && \
scons -j$(nproc) && \
python -m unittest discover selfdrive/car"
static_analysis:
name: static analysis
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker image
run: eval "$BUILD"
- name: pre-commit
run: ${{ env.RUN }} "cd /tmp/openpilot/ && git init && git add -A && pre-commit run --all"

valgrind:
name: valgrind
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache dependencies
id: dependency-cache
uses: actions/cache@v2
with:
path: /tmp/comma_download_cache
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_valgrind_replay.py') }}
- name: Build Docker image
run: eval "$BUILD"
- name: Run valgrind
run: |
${{ env.RUN }} "cd /tmp/openpilot && \
scons -j$(nproc) && \
FILEREADER_CACHE=1 python selfdrive/test/test_valgrind_replay.py"
- name: Print logs
if: always()
run: cat selfdrive/test/valgrind_logs.txt

unit_tests:
name: unit tests
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker image
run: eval "$BUILD"
- name: Run unit tests
run: |
${{ env.RUN }} "cd /tmp/openpilot && \
scons -j$(nproc) && \
coverage run selfdrive/test/test_fingerprints.py && \
$UNIT_TEST common && \
$UNIT_TEST opendbc/can && \
$UNIT_TEST selfdrive/boardd && \
$UNIT_TEST selfdrive/controls && \
$UNIT_TEST selfdrive/monitoring && \
$UNIT_TEST selfdrive/loggerd && \
$UNIT_TEST selfdrive/car && \
$UNIT_TEST selfdrive/locationd && \
$UNIT_TEST selfdrive/athena && \
$UNIT_TEST selfdrive/thermald && \
$UNIT_TEST tools/lib/tests"
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -v -F unit_tests

test_longitudinal:
name: longitudinal
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker image
run: eval "$BUILD"
- name: Test longitudinal
run: |
${{ env.RUN }} "mkdir -p /tmp/openpilot/selfdrive/test/out && \
cd /tmp/openpilot/ && \
scons -j$(nproc) && \
cd selfdrive/test/longitudinal_maneuvers && \
./test_longitudinal.py"
- uses: actions/upload-artifact@v2
if: always()
continue-on-error: true
with:
name: longitudinal
path: selfdrive/test/longitudinal_maneuvers/out/longitudinal/

test_car_models:
name: car models
runs-on: ubuntu-20.04
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache dependencies
id: dependency-cache
uses: actions/cache@v2
with:
path: /tmp/comma_download_cache
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_car_models.py') }}
- name: Build Docker image
run: eval "$BUILD"
- name: Test car models
run: |
${{ env.RUN }} "cd /tmp/openpilot && \
scons -j$(nproc) && \
FILEREADER_CACHE=1 coverage run --parallel-mode -m nose --processes=4 --process-timeout=60 \
selfdrive/test/test_models.py && \
coverage combine"
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -v -F test_car_models
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
hooks:
- id: check-ast
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
- repo: https://github.com/pre-commit/mirrors-mypy
rev: master
hooks:
- id: mypy
exclude: '^(pyextra)|(external)|(cereal)|(rednose)|(panda)|(laika)|(opendbc)|(laika_repo)|(rednose_repo)/'
additional_dependencies: ['git+https://github.com/numpy/numpy-stubs']
- repo: https://github.com/PyCQA/flake8
rev: master
hooks:
- id: flake8
exclude: '^(pyextra)|(external)|(cereal)|(rednose)|(panda)|(laika)|(opendbc)|(laika_repo)|(rednose_repo)|(selfdrive/debug)/'
args:
- --select=F,E112,E113,E304,E501,E502,E701,E702,E703,E71,E72,E731,W191,W6
- --max-line-length=240
- --statistics
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: '^(pyextra)|(external)|(cereal)|(rednose)|(panda)|(laika)|(laika_repo)|(rednose_repo)/'
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
types: [c++]
exclude: '^(phonelibs)|(external)|(cereal)|(opendbc)|(panda)|(tools)|(selfdrive/modeld/thneed/debug)|(selfdrive/modeld/test)|(selfdrive/camerad/test)/|(installer)'
args:
- --error-exitcode=1
- --language=c++
- --quiet
- --force
- -j8
Loading

0 comments on commit c65fe59

Please sign in to comment.