mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 00:43:54 +08:00
CI tuneup (#24541)
* little housekeeping
* all the commits
* one more cars
old-commit-hash: b2569d871f
This commit is contained in:
93
.github/workflows/selfdrive_tests.yaml
vendored
93
.github/workflows/selfdrive_tests.yaml
vendored
@@ -26,10 +26,11 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
env:
|
||||
STRIPPED_DIR: tmppilot
|
||||
STRIPPED_DIR: /tmp/releasepilot
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Check submodules
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
|
||||
@@ -46,16 +47,10 @@ jobs:
|
||||
restore-keys: |
|
||||
scons-${{ hashFiles('.github/workflows/selfdrive_tests.yaml') }}-
|
||||
scons-
|
||||
- name: Strip non-release files
|
||||
- name: Build devel
|
||||
run: |
|
||||
mkdir $STRIPPED_DIR
|
||||
cp -pR --parents $(cat release/files_common) $STRIPPED_DIR
|
||||
cp -pR --parents $(cat release/files_tici) $STRIPPED_DIR
|
||||
cp -pR --parents $(cat release/files_pc) $STRIPPED_DIR
|
||||
TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
|
||||
cp Dockerfile.openpilot_base $STRIPPED_DIR
|
||||
|
||||
# need this to build on x86
|
||||
cp -pR --parents third_party/libyuv third_party/snpe selfdrive/modeld/runners $STRIPPED_DIR
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Build openpilot and run checks
|
||||
@@ -63,32 +58,43 @@ jobs:
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "CI=1 python selfdrive/manager/build.py && \
|
||||
python -m unittest discover selfdrive/car"
|
||||
- name: Cleanup scons cache
|
||||
run: |
|
||||
cd $STRIPPED_DIR
|
||||
${{ env.RUN }} "scons -j$(nproc) && \
|
||||
rm -rf /tmp/scons_cache/* && \
|
||||
scons -j$(nproc) --cache-populate"
|
||||
|
||||
build_all:
|
||||
name: build all
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache scons
|
||||
id: scons-cache
|
||||
# TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged.
|
||||
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
|
||||
env:
|
||||
CACHE_SKIP_SAVE: ${{ github.ref != 'refs/heads/master' || github.repository != 'commaai/openpilot' }}
|
||||
with:
|
||||
path: /tmp/scons_cache
|
||||
key: scons-${{ hashFiles('.github/workflows/selfdrive_tests.yaml') }}-${{ steps.date.outputs.time }}
|
||||
restore-keys: |
|
||||
scons-${{ hashFiles('.github/workflows/selfdrive_tests.yaml') }}-
|
||||
scons-
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Build openpilot with all flags
|
||||
run: ${{ env.RUN }} "scons -j$(nproc) --extras --test"
|
||||
- name: Cleanup scons cache
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc) --extras --test && \
|
||||
rm -rf /tmp/scons_cache/* && \
|
||||
scons -j$(nproc) --cache-populate"
|
||||
|
||||
#build_mac:
|
||||
# name: build macos
|
||||
# runs-on: macos-latest
|
||||
# timeout-minutes: 60
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# submodules: true
|
||||
# - name: Determine pre-existing Homebrew packages
|
||||
@@ -147,9 +153,21 @@ jobs:
|
||||
env:
|
||||
IMAGE_NAME: openpilotwebcamci
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache scons
|
||||
id: scons-cache
|
||||
# TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged.
|
||||
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
|
||||
env:
|
||||
CACHE_SKIP_SAVE: true
|
||||
with:
|
||||
path: /tmp/scons_cache
|
||||
key: scons-${{ hashFiles('.github/workflows/selfdrive_tests.yaml') }}-
|
||||
restore-keys: |
|
||||
scons-${{ hashFiles('.github/workflows/selfdrive_tests.yaml') }}-
|
||||
scons-
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
eval "$BUILD"
|
||||
@@ -170,7 +188,7 @@ jobs:
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build Docker image
|
||||
@@ -185,20 +203,20 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: pre-commit
|
||||
run: ${{ env.RUN }} "git init && git add -A && pre-commit run --all"
|
||||
run: ${{ env.RUN }} "pre-commit run --all"
|
||||
|
||||
valgrind:
|
||||
name: valgrind
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache dependencies
|
||||
@@ -241,7 +259,7 @@ jobs:
|
||||
run: echo $TIMESTAMP
|
||||
env:
|
||||
TIMESTAMP: ${{ steps.date.outputs.time }}
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache scons
|
||||
@@ -289,7 +307,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache dependencies
|
||||
@@ -334,27 +352,12 @@ jobs:
|
||||
- name: "Upload coverage to Codecov"
|
||||
uses: codecov/codecov-action@v2
|
||||
|
||||
#model_replay:
|
||||
# name: model replay
|
||||
# runs-on: ubuntu-20.04
|
||||
# timeout-minutes: 50
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: true
|
||||
# - name: Build Docker image
|
||||
# run: eval "$BUILD"
|
||||
# - name: Run replay
|
||||
# run: |
|
||||
# ${{ env.RUN }} "scons -j$(nproc) && \
|
||||
# selfdrive/test/process_replay/model_replay.py"
|
||||
|
||||
test_longitudinal:
|
||||
name: longitudinal
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache scons
|
||||
@@ -394,9 +397,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job: [0, 1, 2, 3]
|
||||
job: [0, 1, 2, 3, 4]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache dependencies
|
||||
@@ -426,7 +429,7 @@ jobs:
|
||||
coverage xml && \
|
||||
chmod -R 777 /tmp/comma_download_cache"
|
||||
env:
|
||||
NUM_JOBS: 4
|
||||
NUM_JOBS: 5
|
||||
JOB_ID: ${{ matrix.job }}
|
||||
- name: "Upload coverage to Codecov"
|
||||
uses: codecov/codecov-action@v2
|
||||
@@ -436,7 +439,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build docker container
|
||||
|
||||
Reference in New Issue
Block a user