CI: fix mounting in GITHUB_WORKSPACE (#1175)

This commit is contained in:
Adeeb Shihadeh
2022-11-30 15:56:15 -08:00
committed by GitHub
parent 27504639f0
commit b19a74f93d

View File

@@ -6,8 +6,8 @@ concurrency:
cancel-in-progress: true
env:
RUN: docker run -v $GITHUB_WORKSPACE:/tmp/openpilot/panda -w /tmp/openpilot/panda --rm panda /bin/bash -c
PERSIST: docker run -v $GITHUB_WORKSPACE:/tmp/openpilot/panda -w /tmp/openpilot/panda --name panda panda /bin/bash -c
RUN: docker run -v ${{ github.workspace }}:/tmp/openpilot/panda -w /tmp/openpilot/panda --rm panda /bin/bash -c
PERSIST: docker run -v ${{ github.workspace }}:/tmp/openpilot/panda -w /tmp/openpilot/panda --name panda 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 .
@@ -39,11 +39,11 @@ jobs:
- name: Build Docker image
run: eval "$BUILD"
- name: Test python package installer
run: ${{ env.RUN }} "cd /tmp/openpilot/panda && python setup.py install"
run: ${{ env.RUN }} "python setup.py install"
- name: Build panda + pedal images and bootstub
run: ${{ env.RUN }} "cd /tmp/openpilot/panda && scons -j4"
run: ${{ env.RUN }} "scons -j4"
- name: Build panda with SPI support
run: ${{ env.RUN }} "cd /tmp/openpilot/panda && ENABLE_SPI=1 scons -j4"
run: ${{ env.RUN }} "ENABLE_SPI=1 scons -j4"
unit_tests:
name: unit tests
@@ -53,9 +53,8 @@ jobs:
- uses: actions/checkout@v2
- name: Build Docker image
run: eval "$BUILD"
- name: Test pack/unpack for USB protocol
run: ${{ env.RUN }} "cd /tmp/openpilot/panda/tests/usbprotocol &&
python -m unittest discover ."
- name: Test communication protocols
run: $RUN "cd tests/usbprotocol && python -m unittest discover ."
safety:
name: safety
@@ -68,7 +67,7 @@ jobs:
- name: Run safety tests
timeout-minutes: 4
run: |
${{ env.RUN }} "cd /tmp/openpilot && \
${{ env.RUN }} "cd .. && \
scons -c && \
scons -j$(nproc) opendbc/ cereal/ && \
cd panda/tests/safety && \