Move simulator CI to tools workflow (#20285)
* sim CI * simulator CI * scons already in Dockerfile.sim * faster * fast * testingalbatross
parent
05f6c97f4c
commit
539426033b
|
@ -1,26 +0,0 @@
|
|||
name: simulator
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
|
||||
jobs:
|
||||
docker_build:
|
||||
name: build container
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
lfs: true
|
||||
- name: Docker build
|
||||
run: |
|
||||
docker pull commaai/openpilot-sim:latest || true
|
||||
tools/sim/build_container.sh
|
||||
- name: Push to dockerhub
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN }}
|
||||
docker tag commaai/openpilot-sim docker.io/commaai/openpilot-sim:latest
|
||||
docker push docker.io/commaai/openpilot-sim:latest
|
|
@ -6,6 +6,7 @@ on:
|
|||
env:
|
||||
BASE_IMAGE: openpilot-base
|
||||
DOCKER_REGISTRY: ghcr.io/commaai
|
||||
DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }}
|
||||
|
||||
BUILD: |
|
||||
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true
|
||||
|
@ -23,7 +24,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build docker image
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Unit test
|
||||
run: |
|
||||
|
@ -32,3 +33,26 @@ jobs:
|
|||
apt-get install -y libdw-dev libqt5svg5-dev libqt5x11extras5-dev && \
|
||||
cd /tmp/openpilot/tools/plotjuggler && \
|
||||
./test_plotjuggler.py"
|
||||
|
||||
simulator:
|
||||
name: simulator
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 50
|
||||
env:
|
||||
IMAGE_NAME: openpilot-sim
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
lfs: true
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
eval "$BUILD"
|
||||
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/sim/Dockerfile.sim .
|
||||
- name: Push to container registry
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
docker push $DOCKER_REGISTRY/$IMAGE_NAME:latest
|
||||
|
|
Loading…
Reference in New Issue