Skip to content

Commit

Permalink
CI: fix mounting in GITHUB_WORKSPACE (commaai#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored and mlocoteta committed Apr 29, 2023
1 parent 58eb618 commit e7be9d0
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 && \
Expand Down

0 comments on commit e7be9d0

Please sign in to comment.