Files
msgq/.github/workflows/tests.yml
Willem Melching 95e32803cd Visionipc v2.0 (#101)
* add visionbuf

make static

ignore that

* Needs decleration

* add test binary

* c++

* create some structure

* some impl

* socket stuff

* Accept socket connection

* Alloc some buffers

* Create pub sockets and send buffer id

* make listener private

* Implement receive

* use error check macros in cl_helpers

* constructors to pass in opencl context

* add some convenience values in struct

* refactor creating buffers

* rgb is not so simple

* add fake stride and expose buffers

* add comment

* add extra data struct

* support conflate

* init opencl on all buffers

* make ion compile

* fix qcom2

* correctly setup yuv pointers when importing buffer

* also included from c

* Remove send print statements

* send metadata

* reveive metadata

* also used in c code

* dont start listener automatically

* Was started in 2 places

* set 100ms timeout on socket

* verify server id to detect reconnects

* handle reconnect

* buffer cleanup

* let user handle opencl creation

* add default values

* Add support for aligned rgb buffers

* add align macro

* dont use namespace

* use poller

* apple ifdef in ipc.cc

* VisionBuf is C++ class

* Install opencl headers

* cppcheck c++

* remove c header guard

* fix mac build

* simplify constructors

* Update visionipc/visionipc.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update visionipc/visionbuf_ion.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add brackets

* s/VIPCBufExtra/VisionIpcBufExtra/g

* Add unittesting harness

* remove vipc demo

* very basic tests

* add conflate test

* Install opencl

* suppress msgq warnings

* Make it work using zmq

* cl in qcom replay

* run unittests in zmq mode as well

* non blocking connect

* always larger frame queues

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-08 14:54:41 +01:00

87 lines
2.6 KiB
YAML

name: tests
on: [push, pull_request]
env:
RUN: docker run --shm-size 1G --name cereal cereal /bin/sh -c
CI_RUN: docker run -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID --rm cerealci /bin/bash -c
BUILD: |
docker pull $(grep -ioP '(?<=^from)\s+\S+' Dockerfile) || true
docker pull docker.io/commaai/cereal:latest || true
docker build --cache-from docker.io/commaai/cereal:latest -t cereal -f Dockerfile .
jobs:
build:
name: build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Push to dockerhub
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/cereal'
run: |
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}}
docker tag cereal docker.io/commaai/cereal:latest
docker push docker.io/commaai/cereal:latest
unit_tests:
name: unit tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Unit Tests
run: |
$RUN "scons --test --asan -j$(nproc) && messaging/test_runner && visionipc/test_runner"
unit_tests_zmq:
name: unit tests zmq
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Unit Tests
run: |
$RUN "scons --test --asan -j$(nproc) && ZMQ=1 messaging/test_runner && ZMQ=1 visionipc/test_runner"
test_zmq:
name: zmq
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Test ZMQ
run: $RUN "ZMQ=1 coverage run -m unittest discover ."
- name: Upload coverage
run: |
docker commit cereal cerealci
$CI_RUN "cd /project/cereal && bash <(curl -s https://codecov.io/bash) -v -F unit_tests_zmq"
test_msgq:
name: msgq
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Test MSGQ
run: $RUN "MSGQ=1 coverage run -m unittest discover ."
- name: Upload coverage
run: |
docker commit cereal cerealci
$CI_RUN "cd /project/cereal && bash <(curl -s https://codecov.io/bash) -v -F unit_tests_msgq"
static_analysis:
name: static analysis
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: eval "$BUILD"
- name: Static analysis
run: $RUN "git init && git add -A && pre-commit run --all"