Skip to content

Initializes CRC lookup tables at module initialization #4533

Initializes CRC lookup tables at module initialization

Initializes CRC lookup tables at module initialization #4533

Workflow file for this run

name: tests
on: [push, pull_request]
env:
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -e PYTHONWARNINGS="error,default::DeprecationWarning" --shm-size 1G --rm opendbc /bin/bash -c
BUILD: docker buildx build --pull --load --cache-to type=inline --cache-from type=registry,ref=ghcr.io/commaai/opendbc:latest -t opendbc -f Dockerfile .
PYTHONWARNINGS: error
jobs:
unit-tests:
name: unit tests
runs-on: ubuntu-latest
#strategy:
# fail-fast: false
# matrix:
# run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: eval "$BUILD"
- name: Build opendbc
run: ${{ env.RUN }} "cd ../ && scons -j$(nproc) --minimal"
- name: Unit tests
run: ${{ env.RUN }} "python -m unittest discover ."
static-analysis:
name: static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: eval "$BUILD"
- name: Build opendbc
run: ${{ env.RUN }} "cd ../ && scons -j$(nproc) --minimal"
- name: pre-commit
# TODO: a package pre-commit installs has a warning, remove the unset once that's fixed
run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all"
- name: Generator test
run: ${{ env.RUN }} "generator/test_generator.py"
docker-push:
name: docker push
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/opendbc'
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: eval "$BUILD"
- name: Push to dockerhub
run: |
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
docker tag opendbc ghcr.io/commaai/opendbc:latest
docker push ghcr.io/commaai/opendbc:latest