mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
speeeedy ci (#2209)
* speeeedy ci * disable for now * rm * cppcheck cache * simple docker * one more * needs to get to 1m... * one more * needs time to build * libusb
This commit is contained in:
63
.github/workflows/test.yaml
vendored
63
.github/workflows/test.yaml
vendored
@@ -11,39 +11,16 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
RUN: docker run -v ${{ github.workspace }}:/tmp/pythonpath/panda -w /tmp/pythonpath/panda --rm panda /bin/bash -c
|
||||
BUILD: |
|
||||
export DOCKER_BUILDKIT=1
|
||||
docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ghcr.io/commaai/panda:latest -t panda -f Dockerfile .
|
||||
|
||||
PYTHONWARNINGS: "error"
|
||||
RUN: source .venv/bin/activate && /bin/bash -c
|
||||
|
||||
jobs:
|
||||
docker_push:
|
||||
name: docker push
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/panda'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
timeout-minutes: 11
|
||||
run: eval "$BUILD"
|
||||
- name: Login to dockerhub
|
||||
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Tag image
|
||||
run: docker tag panda ghcr.io/commaai/panda:latest
|
||||
- name: Push image
|
||||
run: docker push ghcr.io/commaai/panda:latest
|
||||
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- run: ./setup.sh
|
||||
- name: Test python package installer
|
||||
run: ${{ env.RUN }} "pip install --break-system-packages .[dev]"
|
||||
- name: Build panda images and bootstub
|
||||
@@ -60,11 +37,10 @@ jobs:
|
||||
unit_tests:
|
||||
name: unit tests
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- run: ./setup.sh
|
||||
- name: Build panda
|
||||
run: $RUN "scons -j4"
|
||||
- name: Test communication protocols
|
||||
@@ -73,25 +49,35 @@ jobs:
|
||||
misra_linter:
|
||||
name: MISRA C:2012 Linter
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Cache cppcheck
|
||||
id: cppcheck-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: tests/misra/cppcheck
|
||||
key: cppcheck-${{ hashFiles('tests/misra/*') }}
|
||||
- run: ./setup.sh
|
||||
- name: Build FW
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: Run MISRA C:2012 analysis
|
||||
timeout-minutes: 2
|
||||
timeout-minutes: 4
|
||||
run: ${{ env.RUN }} "cd tests/misra && ./test_misra.sh"
|
||||
|
||||
misra_mutation:
|
||||
name: MISRA C:2012 Mutation
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Cache cppcheck
|
||||
id: cppcheck-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: tests/misra/cppcheck
|
||||
key: cppcheck-${{ hashFiles('tests/misra/*') }}
|
||||
- run: ./setup.sh
|
||||
- name: Build FW
|
||||
run: ${{ env.RUN }} "scons -j$(nproc)"
|
||||
- name: MISRA mutation tests
|
||||
@@ -101,11 +87,10 @@ jobs:
|
||||
static_analysis:
|
||||
name: static analysis
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- run: ./setup.sh
|
||||
- name: Run static analysis
|
||||
timeout-minutes: 3
|
||||
run: ${{ env.RUN }} "pre-commit run --all"
|
||||
|
||||
Reference in New Issue
Block a user