mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
Build openpilot with webcam support in CI (#2070)
old-commit-hash: f4e18e0b74
This commit is contained in:
24
.github/workflows/test.yaml
vendored
24
.github/workflows/test.yaml
vendored
@@ -10,16 +10,13 @@ env:
|
||||
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 tmppilotci /bin/bash -c
|
||||
UNIT_TEST: coverage run --append -m unittest discover
|
||||
BUILD: |
|
||||
# build the openpilot docker base image
|
||||
docker pull $(grep -ioP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true
|
||||
docker pull docker.io/commaai/openpilot-base:latest || true
|
||||
docker build --cache-from docker.io/commaai/openpilot-base:latest -t commaai/openpilot-base:latest -f Dockerfile.openpilot_base .
|
||||
|
||||
# build the final CI image
|
||||
docker pull docker.io/commaai/openpilotci:latest || true
|
||||
docker build --cache-from docker.io/commaai/openpilotci:latest -t tmppilot -f Dockerfile.openpilotci .
|
||||
|
||||
|
||||
jobs:
|
||||
build_release:
|
||||
name: build release
|
||||
@@ -78,6 +75,27 @@ jobs:
|
||||
- name: Brew cleanup
|
||||
run: brew cleanup || true # keeps our cache small
|
||||
|
||||
build_webcam:
|
||||
name: build webcam
|
||||
runs-on: ubuntu-16.04
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker pull docker.io/commaai/openpilotwebcamci:latest
|
||||
docker build --cache-from docker.io/commaai/openpilotwebcamci:latest -t tmppilotwebcam -f tools/webcam/Dockerfile .
|
||||
- name: Build openpilot
|
||||
run: docker run --shm-size 1G --rm tmppilotwebcam /bin/sh -c "cd /tmp/openpilot && USE_WEBCAM=1 scons -j$(nproc)"
|
||||
- name: Push to dockerhub
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}}
|
||||
docker tag tmppilotwebcam docker.io/commaai/openpilotwebcamci:latest
|
||||
docker push docker.io/commaai/openpilotwebcamci:latest
|
||||
|
||||
docker_push:
|
||||
name: docker push
|
||||
runs-on: ubuntu-16.04
|
||||
|
||||
Reference in New Issue
Block a user