mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 00:03:54 +08:00
* arch specific tags
* merge multiarch script
* arm64 build and merge jobs
* update tag script
* casual ci test
* change image to 2204
* docker -v test
* arch specific naming
* Remove test_buildjet
* build -arch images only when CURRENT_ARCH_BUILD is set
* support new tags in tag_multiarch
* Toggle CURRENT_ARCH_BUILD on in ci
* Docker common
* Fix condition
* Fix path to docker_common
* Add more stuff to common
* Add build_arm job
* composite job for building
* Run checkout before build composite
* add shell arg
* move timeout to selfdrive_tests
* TARGET ARCHITECTURE var
* Support TARGET_ARCHITECTURE in workflow
* Rewrite to Single build job with matrix
* Remove shebang from docker_common
* Attempt for fix build matrix
* Remove setup arch
* build matrix for docker push
* Use 2vcpu for arm build
* 2vcpu for docker_push too
* temporarly unlock docker_push
* Remove requirement for target arch when pushing
* Unset target architecture in docker_push cl
* fix sha tags
* Rename action to compile-openpilot
* move push_image line to tag_multiarch step
* arch suffix for scons cache
* cache_key_prefix for setup-with-retry
* Re-disable docker_push on non-master
* Add newlines
old-commit-hash: 1344a93a35
27 lines
850 B
Bash
Executable File
27 lines
850 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# To build sim and docs, you can run the following to mount the scons cache to the same place as in CI:
|
|
# mkdir -p .ci_cache/scons_cache
|
|
# sudo mount --bind /tmp/scons_cache/ .ci_cache/scons_cache
|
|
|
|
SCRIPT_DIR=$(dirname "$0")
|
|
OPENPILOT_DIR=$SCRIPT_DIR/../../
|
|
if [ -n "$TARGET_ARCHITECTURE" ]; then
|
|
PLATFORM="linux/$TARGET_ARCHITECTURE"
|
|
TAG_SUFFIX="-$TARGET_ARCHITECTURE"
|
|
else
|
|
PLATFORM="linux/$(uname -m)"
|
|
TAG_SUFFIX=""
|
|
fi
|
|
|
|
source $SCRIPT_DIR/docker_common.sh $1 "$TAG_SUFFIX"
|
|
|
|
DOCKER_BUILDKIT=1 docker buildx build --platform $PLATFORM --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 [ -n "$PUSH_IMAGE" ]; then
|
|
docker push $REMOTE_TAG
|
|
docker tag $REMOTE_TAG $REMOTE_SHA_TAG
|
|
docker push $REMOTE_SHA_TAG
|
|
fi
|