|
|
@ -6,18 +6,17 @@ on: |
|
|
|
pull_request: |
|
|
|
pull_request: |
|
|
|
|
|
|
|
|
|
|
|
env: |
|
|
|
env: |
|
|
|
RUN: docker run --shm-size 1G --rm tmppilot /bin/sh -c |
|
|
|
BASE_IMAGE: openpilot-base |
|
|
|
PERSIST_WITH_CACHE: docker run --shm-size 1G -v /tmp/comma_download_cache:/tmp/comma_download_cache --name tmppilot tmppilot /bin/sh -c |
|
|
|
DOCKER_REGISTRY: ghcr.io/commaai |
|
|
|
PERSIST: docker run --shm-size 1G --name tmppilot tmppilot /bin/sh -c |
|
|
|
|
|
|
|
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 |
|
|
|
DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }} |
|
|
|
UNIT_TEST: coverage run --append -m unittest discover |
|
|
|
|
|
|
|
BUILD: | |
|
|
|
BUILD: | |
|
|
|
docker pull $(grep -ioP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true |
|
|
|
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true |
|
|
|
docker pull docker.io/commaai/openpilot-base:latest || true |
|
|
|
docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true |
|
|
|
docker build --cache-from docker.io/commaai/openpilot-base:latest -t commaai/openpilot-base:latest -f Dockerfile.openpilot_base . |
|
|
|
docker build --cache-from $DOCKER_REGISTRY/$BASE_IMAGE:latest -t $DOCKER_REGISTRY/$BASE_IMAGE:latest -t $BASE_IMAGE:latest -f Dockerfile.openpilot_base . |
|
|
|
|
|
|
|
|
|
|
|
docker pull docker.io/commaai/openpilotci:latest || true |
|
|
|
RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v /tmp/comma_download_cache:/tmp/comma_download_cache $BASE_IMAGE /bin/sh -c |
|
|
|
docker build --cache-from docker.io/commaai/openpilotci:latest -t tmppilot -f Dockerfile.openpilotci . |
|
|
|
UNIT_TEST: coverage run --append -m unittest discover |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
build_release: |
|
|
|
build_release: |
|
|
@ -25,32 +24,27 @@ jobs: |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
env: |
|
|
|
env: |
|
|
|
TEST_DIR: tmppilot |
|
|
|
STRIPPED_DIR: tmppilot |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Strip non-release files |
|
|
|
- name: Strip non-release files |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
mkdir $TEST_DIR |
|
|
|
mkdir $STRIPPED_DIR |
|
|
|
cp -pR --parents $(cat release/files_common) $TEST_DIR |
|
|
|
cp -pR --parents $(cat release/files_common) $STRIPPED_DIR |
|
|
|
cp Dockerfile.openpilot_base Dockerfile.openpilotci $TEST_DIR |
|
|
|
cp Dockerfile.openpilot_base $STRIPPED_DIR |
|
|
|
|
|
|
|
|
|
|
|
# need this to build on x86 |
|
|
|
# need this to build on x86 |
|
|
|
cp -pR --parents phonelibs/libyuv phonelibs/snpe \ |
|
|
|
cp -pR --parents phonelibs/libyuv phonelibs/snpe selfdrive/modeld/runners $STRIPPED_DIR |
|
|
|
external/bin selfdrive/modeld/runners $TEST_DIR |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# need these so docker copy won't fail |
|
|
|
|
|
|
|
cp Pipfile Pipfile.lock .pylintrc .pre-commit-config.yaml $TEST_DIR |
|
|
|
|
|
|
|
cd $TEST_DIR |
|
|
|
|
|
|
|
mkdir laika laika_repo tools |
|
|
|
|
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: cd $TEST_DIR && eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Build openpilot and run quick check |
|
|
|
- name: Build openpilot and run checks |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
$RUN "cd /tmp/openpilot && \ |
|
|
|
cd $STRIPPED_DIR |
|
|
|
scons -j$(nproc) && \ |
|
|
|
${{ env.RUN }} "cd /tmp/openpilot && \ |
|
|
|
$UNIT_TEST selfdrive/car" |
|
|
|
scons -j$(nproc) && \ |
|
|
|
|
|
|
|
python -m unittest discover selfdrive/car" |
|
|
|
|
|
|
|
|
|
|
|
build_mac: |
|
|
|
build_mac: |
|
|
|
name: build macos |
|
|
|
name: build macos |
|
|
@ -81,22 +75,24 @@ jobs: |
|
|
|
name: build webcam |
|
|
|
name: build webcam |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 90 |
|
|
|
timeout-minutes: 90 |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
IMAGE_NAME: openpilotwebcamci |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
docker pull docker.io/commaai/openpilotwebcamci:latest |
|
|
|
eval "$BUILD" |
|
|
|
docker build --cache-from docker.io/commaai/openpilotwebcamci:latest -t tmppilotwebcam -f tools/webcam/Dockerfile . |
|
|
|
docker pull $DOCKER_REGISTRY/$IMAGE_NAME:latest || true |
|
|
|
|
|
|
|
docker build --cache-from $DOCKER_REGISTRY/$IMAGE_NAME:latest -t $DOCKER_REGISTRY/$IMAGE_NAME:latest -f tools/webcam/Dockerfile . |
|
|
|
- name: Build openpilot |
|
|
|
- name: Build openpilot |
|
|
|
run: docker run --shm-size 1G --rm tmppilotwebcam /bin/sh -c "cd /tmp/openpilot && USE_WEBCAM=1 scons -j$(nproc)" |
|
|
|
run: docker run --shm-size 1G --rm $DOCKER_REGISTRY/$IMAGE_NAME /bin/sh -c "cd /tmp/openpilot && USE_WEBCAM=1 scons -j$(nproc)" |
|
|
|
- name: Push to dockerhub |
|
|
|
- name: Push to container registry |
|
|
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' |
|
|
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}} |
|
|
|
$DOCKER_LOGIN |
|
|
|
docker tag tmppilotwebcam docker.io/commaai/openpilotwebcamci:latest |
|
|
|
docker push $DOCKER_REGISTRY/$IMAGE_NAME:latest |
|
|
|
docker push docker.io/commaai/openpilotwebcamci:latest |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker_push: |
|
|
|
docker_push: |
|
|
|
name: docker push |
|
|
|
name: docker push |
|
|
@ -105,18 +101,15 @@ jobs: |
|
|
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' |
|
|
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' |
|
|
|
needs: static_analysis # hack to ensure slow tests run first since this and static_analysis are fast |
|
|
|
needs: static_analysis # hack to ensure slow tests run first since this and static_analysis are fast |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Push to dockerhub |
|
|
|
- name: Push to container registry |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}} |
|
|
|
$DOCKER_LOGIN |
|
|
|
docker tag commaai/openpilot-base:latest docker.io/commaai/openpilot-base:latest |
|
|
|
docker push $DOCKER_REGISTRY/$BASE_IMAGE:latest |
|
|
|
docker push docker.io/commaai/openpilot-base:latest |
|
|
|
|
|
|
|
docker tag tmppilot docker.io/commaai/openpilotci:latest |
|
|
|
|
|
|
|
docker push docker.io/commaai/openpilotci:latest |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker_push_prebuilt: |
|
|
|
docker_push_prebuilt: |
|
|
|
name: docker push prebuilt |
|
|
|
name: docker push prebuilt |
|
|
@ -124,188 +117,168 @@ jobs: |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
if: github.event_name == 'status' && github.repository == 'commaai/openpilot' |
|
|
|
if: github.event_name == 'status' && github.repository == 'commaai/openpilot' |
|
|
|
needs: [static_analysis, unit_tests, process_replay, test_longitudinal, test_car_models] |
|
|
|
needs: [static_analysis, unit_tests, process_replay, test_longitudinal, test_car_models] |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
IMAGE_NAME: openpilot-prebuilt |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: echo "RUN cd /tmp/openpilot && scons -c && scons -j\$(nproc)" >> Dockerfile.openpilotci && eval "$BUILD" |
|
|
|
run: | |
|
|
|
- name: Push to dockerhub |
|
|
|
eval "$BUILD" |
|
|
|
run: | |
|
|
|
docker pull $DOCKER_REGISTRY/$IMAGE_NAME:latest || true |
|
|
|
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}} |
|
|
|
docker build --cache-from $DOCKER_REGISTRY/$IMAGE_NAME:latest -t $DOCKER_REGISTRY/$IMAGE_NAME:latest -f Dockerfile.openpilot . |
|
|
|
docker tag tmppilot docker.io/commaai/openpilot:latest |
|
|
|
- name: Push to container registry |
|
|
|
docker push docker.io/commaai/openpilot:latest |
|
|
|
run: | |
|
|
|
|
|
|
|
$DOCKER_LOGIN |
|
|
|
|
|
|
|
docker push $DOCKER_REGISTRY/$IMAGE_NAME:latest |
|
|
|
|
|
|
|
|
|
|
|
static_analysis: |
|
|
|
static_analysis: |
|
|
|
name: static analysis |
|
|
|
name: static analysis |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: pre-commit |
|
|
|
- name: pre-commit |
|
|
|
run: $RUN "cd /tmp/openpilot/ && git init && git add -A && pre-commit run --all" |
|
|
|
run: ${{ env.RUN }} "cd /tmp/openpilot/ && git init && git add -A && pre-commit run --all" |
|
|
|
|
|
|
|
|
|
|
|
valgrind: |
|
|
|
valgrind: |
|
|
|
name: valgrind |
|
|
|
name: valgrind |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Cache dependencies |
|
|
|
- name: Cache dependencies |
|
|
|
id: dependency-cache |
|
|
|
id: dependency-cache |
|
|
|
uses: actions/cache@v2 |
|
|
|
uses: actions/cache@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
path: | |
|
|
|
path: /tmp/comma_download_cache |
|
|
|
/tmp/comma_download_cache |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_valgrind_replay.py') }} |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_valgrind_replay.py') }} |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Run valgrind |
|
|
|
- name: Run valgrind |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
${{ env.RUN }} "cd /tmp/openpilot && \ |
|
|
|
$PERSIST_WITH_CACHE "cd /tmp/openpilot && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
FILEREADER_CACHE=1 python selfdrive/test/test_valgrind_replay.py" |
|
|
|
FILEREADER_CACHE=1 python selfdrive/test/test_valgrind_replay.py" |
|
|
|
- name: Print logs |
|
|
|
- name: Print logs |
|
|
|
if: always() |
|
|
|
if: always() |
|
|
|
run: cat selfdrive/test/valgrind_logs.txt |
|
|
|
run: | |
|
|
|
|
|
|
|
docker cp tmppilot:/tmp/openpilot/selfdrive/test/valgrind_logs.txt valgrind_logs.txt |
|
|
|
|
|
|
|
cat valgrind_logs.txt |
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
|
|
|
|
if: always() |
|
|
|
|
|
|
|
continue-on-error: true |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
name: valgrind_logs.txt |
|
|
|
|
|
|
|
path: valgrind_logs.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unit_tests: |
|
|
|
unit_tests: |
|
|
|
name: unit tests |
|
|
|
name: unit tests |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Run unit tests |
|
|
|
- name: Run unit tests |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
$PERSIST "cd /tmp/openpilot && \ |
|
|
|
${{ env.RUN }} "cd /tmp/openpilot && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
coverage run selfdrive/test/test_fingerprints.py && \ |
|
|
|
coverage run selfdrive/test/test_fingerprints.py && \ |
|
|
|
$UNIT_TEST common && \ |
|
|
|
$UNIT_TEST common && \ |
|
|
|
$UNIT_TEST opendbc/can && \ |
|
|
|
$UNIT_TEST opendbc/can && \ |
|
|
|
$UNIT_TEST selfdrive/boardd && \ |
|
|
|
$UNIT_TEST selfdrive/boardd && \ |
|
|
|
$UNIT_TEST selfdrive/controls && \ |
|
|
|
$UNIT_TEST selfdrive/controls && \ |
|
|
|
$UNIT_TEST selfdrive/monitoring && \ |
|
|
|
$UNIT_TEST selfdrive/monitoring && \ |
|
|
|
$UNIT_TEST selfdrive/loggerd && \ |
|
|
|
$UNIT_TEST selfdrive/loggerd && \ |
|
|
|
$UNIT_TEST selfdrive/car && \ |
|
|
|
$UNIT_TEST selfdrive/car && \ |
|
|
|
$UNIT_TEST selfdrive/locationd && \ |
|
|
|
$UNIT_TEST selfdrive/locationd && \ |
|
|
|
$UNIT_TEST selfdrive/athena && \ |
|
|
|
$UNIT_TEST selfdrive/athena && \ |
|
|
|
$UNIT_TEST selfdrive/thermald && \ |
|
|
|
$UNIT_TEST selfdrive/thermald && \ |
|
|
|
$UNIT_TEST tools/lib/tests" |
|
|
|
$UNIT_TEST tools/lib/tests" |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
run: | |
|
|
|
run: bash <(curl -s https://codecov.io/bash) -v -F unit_tests |
|
|
|
docker commit tmppilot tmppilotci |
|
|
|
|
|
|
|
$CI_RUN "cd /tmp/openpilot && bash <(curl -s https://codecov.io/bash) -v -F unit_tests" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
process_replay: |
|
|
|
process_replay: |
|
|
|
name: process replay |
|
|
|
name: process replay |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Cache dependencies |
|
|
|
- name: Cache dependencies |
|
|
|
id: dependency-cache |
|
|
|
id: dependency-cache |
|
|
|
uses: actions/cache@v2 |
|
|
|
uses: actions/cache@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
path: | |
|
|
|
path: /tmp/comma_download_cache |
|
|
|
/tmp/comma_download_cache |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/process_replay/test_processes.py') }} |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/process_replay/test_processes.py') }} |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Run replay |
|
|
|
- name: Run replay |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
${{ env.RUN }} "cd /tmp/openpilot && \ |
|
|
|
$PERSIST_WITH_CACHE "cd /tmp/openpilot && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
FILEREADER_CACHE=1 CI=1 coverage run selfdrive/test/process_replay/test_processes.py" |
|
|
|
FILEREADER_CACHE=1 CI=1 coverage run selfdrive/test/process_replay/test_processes.py" |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
run: bash <(curl -s https://codecov.io/bash) -v -F process_replay |
|
|
|
run: | |
|
|
|
- name: Print diff |
|
|
|
docker commit tmppilot tmppilotci |
|
|
|
if: always() |
|
|
|
$CI_RUN "cd /tmp/openpilot && bash <(curl -s https://codecov.io/bash) -v -F process_replay" |
|
|
|
run: cat selfdrive/test/process_replay/diff.txt |
|
|
|
- name: Print diff |
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
if: always() |
|
|
|
if: always() |
|
|
|
run: | |
|
|
|
continue-on-error: true |
|
|
|
docker cp tmppilot:/tmp/openpilot/selfdrive/test/process_replay/diff.txt diff.txt |
|
|
|
with: |
|
|
|
cat diff.txt |
|
|
|
name: process_replay_diff.txt |
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
path: selfdrive/test/process_replay/diff.txt |
|
|
|
if: always() |
|
|
|
|
|
|
|
continue-on-error: true |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
name: process_replay_diff.txt |
|
|
|
|
|
|
|
path: diff.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test_longitudinal: |
|
|
|
test_longitudinal: |
|
|
|
name: longitudinal |
|
|
|
name: longitudinal |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Test longitudinal |
|
|
|
- name: Test longitudinal |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
$PERSIST "mkdir -p /tmp/openpilot/selfdrive/test/out && \ |
|
|
|
${{ env.RUN }} "mkdir -p /tmp/openpilot/selfdrive/test/out && \ |
|
|
|
cd /tmp/openpilot/ && \ |
|
|
|
cd /tmp/openpilot/ && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
cd selfdrive/test/longitudinal_maneuvers && \ |
|
|
|
cd selfdrive/test/longitudinal_maneuvers && \ |
|
|
|
OPTEST=1 ./test_longitudinal.py" |
|
|
|
./test_longitudinal.py" |
|
|
|
- name: Copy artifacts |
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
if: always() |
|
|
|
if: always() |
|
|
|
run: | |
|
|
|
continue-on-error: true |
|
|
|
mkdir out |
|
|
|
with: |
|
|
|
docker cp tmppilot:/tmp/openpilot/selfdrive/test/longitudinal_maneuvers/out/longitudinal/ out/ |
|
|
|
name: longitudinal |
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
path: selfdrive/test/longitudinal_maneuvers/out/longitudinal/ |
|
|
|
if: always() |
|
|
|
|
|
|
|
continue-on-error: true |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
name: longitudinal |
|
|
|
|
|
|
|
path: out |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test_car_models: |
|
|
|
test_car_models: |
|
|
|
name: test car models |
|
|
|
name: car models |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 50 |
|
|
|
timeout-minutes: 50 |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
submodules: true |
|
|
|
submodules: true |
|
|
|
- name: Cache dependencies |
|
|
|
- name: Cache dependencies |
|
|
|
id: dependency-cache |
|
|
|
id: dependency-cache |
|
|
|
uses: actions/cache@v2 |
|
|
|
uses: actions/cache@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
path: | |
|
|
|
path: /tmp/comma_download_cache |
|
|
|
/tmp/comma_download_cache |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_car_models.py') }} |
|
|
|
key: ${{ hashFiles('.github/workflows/test.yaml', 'selfdrive/test/test_car_models.py') }} |
|
|
|
- name: Build Docker image |
|
|
|
- name: Build Docker image |
|
|
|
run: eval "$BUILD" |
|
|
|
run: eval "$BUILD" |
|
|
|
- name: Test car models |
|
|
|
- name: Test car models |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
${{ env.RUN }} "cd /tmp/openpilot && \ |
|
|
|
$PERSIST_WITH_CACHE "cd /tmp/openpilot && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
scons -j$(nproc) && \ |
|
|
|
FILEREADER_CACHE=1 coverage run --parallel-mode -m nose --processes=4 --process-timeout=60 \ |
|
|
|
FILEREADER_CACHE=1 coverage run --parallel-mode -m nose --processes=4 --process-timeout=60 \ |
|
|
|
selfdrive/test/test_models.py && \ |
|
|
|
selfdrive/test/test_models.py && \ |
|
|
|
coverage combine" |
|
|
|
coverage combine" |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
- name: Upload coverage to Codecov |
|
|
|
run: bash <(curl -s https://codecov.io/bash) -v -F test_car_models |
|
|
|
run: | |
|
|
|
|
|
|
|
docker commit tmppilot tmppilotci |
|
|
|
|
|
|
|
$CI_RUN "cd /tmp/openpilot && bash <(curl -s https://codecov.io/bash) -v -F test_car_models" |
|
|
|
|
|
|
|