mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-08 23:22:04 +08:00
CI: use scons cache mount for building simulator and docs (#29436)
* build docker image with scons cache * use setup * scons cache * added the dockerfile * add the shell * docs use cache * dont pull lfs for docs * simulator too * dont pull the cache image * fix inputs * inputs * booleans aren't supported * bool not supported * bool isnt supported * fix * readonly cache * fix sim cache too * respect readonly * gitignore and move to correct folder * also copy old * move to tools/ci * move to selfdrive/test * just make the cache writable, it's discarded anyway * minimize diff in this pr old-commit-hash: 197460e06136f66f60e10ccefece646cb472b872
This commit is contained in:
@@ -58,10 +58,14 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup
|
||||
with:
|
||||
setup_docker_scons_cache: true
|
||||
- name: Build base cl image
|
||||
run: eval "$BUILD_CL"
|
||||
- name: Build simulator image
|
||||
run: DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/$IMAGE_NAME:latest -t $DOCKER_REGISTRY/$IMAGE_NAME:latest -f tools/sim/Dockerfile.sim .
|
||||
run: |
|
||||
docker pull $DOCKER_REGISTRY/$IMAGE_NAME:latest
|
||||
DOCKER_BUILDKIT=1 docker build --build-arg BUILDKIT_INLINE_CACHE=1 --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: |
|
||||
@@ -74,14 +78,15 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
env:
|
||||
BUILD: |
|
||||
DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs-base:latest -t $DOCKER_REGISTRY/openpilot-docs-base:latest -f docs/docker/Dockerfile --target openpilot-docs-base .
|
||||
DOCKER_BUILDKIT=1 docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs-base:latest --cache-from $DOCKER_REGISTRY/openpilot-docs:latest -t $DOCKER_REGISTRY/openpilot-docs:latest -f docs/docker/Dockerfile .
|
||||
docker pull $DOCKER_REGISTRY/openpilot-docs:latest
|
||||
DOCKER_BUILDKIT=1 docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $DOCKER_REGISTRY/openpilot-docs:latest -t $DOCKER_REGISTRY/openpilot-docs:latest -f docs/docker/Dockerfile .
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/workflows/setup
|
||||
with:
|
||||
setup_docker_scons_cache: true
|
||||
git_lfs: false
|
||||
- name: Push docker container
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
|
||||
Reference in New Issue
Block a user