Skip to content

Commit

Permalink
CI: use buildjet for process replay (#29277)
Browse files Browse the repository at this point in the history
* squash for pr

* backoff to 4vcpu

* review suggestions

* simplify

---------

Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
Co-authored-by: Justin Newberry <justin@comma.ai>
  • Loading branch information
3 people authored Aug 26, 2023
1 parent 2b4255b commit d35beff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jobs:

process_replay:
name: process replay
runs-on: ubuntu-20.04
runs-on: ${{ ((github.event.pull_request.head.repo.full_name == 'commaai/openpilot') || (github.repository == 'commaai/openpilot')) && 'buildjet-8vcpu-ubuntu-2004' || 'ubuntu-20.04' }}
steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ runs:
run: |
find . -type f -executable -not -perm 755 -exec chmod 755 {} \;
find . -type f -not -executable -not -perm 644 -exec chmod 644 {} \;
- id: setup-buildx-action
if: contains(runner.name, 'buildjet')
name: Set up Docker Buildx on buildjet to ensure a consistent cache
uses: docker/setup-buildx-action@v2
with:
driver: docker-container
# build our docker image
- shell: bash
run: eval ${{ env.BUILD }}
2 changes: 1 addition & 1 deletion selfdrive/test/docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ REMOTE_SHA_TAG=$REMOTE_TAG:$COMMIT_SHA
SCRIPT_DIR=$(dirname "$0")
OPENPILOT_DIR=$SCRIPT_DIR/../../

DOCKER_BUILDKIT=1 docker build --cache-to type=inline --cache-from type=registry,ref=$REMOTE_TAG -t $REMOTE_TAG -t $LOCAL_TAG -f $OPENPILOT_DIR/$DOCKER_FILE $OPENPILOT_DIR
DOCKER_BUILDKIT=1 docker buildx build --load --cache-to type=inline --cache-from type=registry,ref=$REMOTE_TAG -t $REMOTE_TAG -t $LOCAL_TAG -f $OPENPILOT_DIR/$DOCKER_FILE $OPENPILOT_DIR

if [[ ! -z "$PUSH_IMAGE" ]];
then
Expand Down

0 comments on commit d35beff

Please sign in to comment.