Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-aztec-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
timeout-minutes: 80
run: |
sudo shutdown -P 80
./bootstrap.sh image-aztec
./bootstrap.sh image-aztec --check-arch
docker tag aztecprotocol/aztec:${{ env.GIT_COMMIT }} aztecprotocol/aztec:${{ env.GIT_COMMIT }}-arm64
docker push aztecprotocol/aztec:${{ env.GIT_COMMIT }}-arm64
build-nargo-x86:
Expand Down
27 changes: 26 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,34 @@ case "$cmd" in
;;
"image-aztec")
image=aztecprotocol/aztec:$(git rev-parse HEAD)
check_arch=false

# Check for --check-arch flag in args
for arg in "$@"; do
if [ "$arg" = "--check-arch" ]; then
check_arch=true
break
fi
done

docker pull $image &>/dev/null || true
if docker_has_image $image; then
exit
if [ "$check_arch" = true ]; then
# Check we're on the correct architecture
image_arch=$(docker inspect $image --format '{{.Architecture}}')
host_arch=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')

if [ "$image_arch" != "$host_arch" ]; then
echo "Warning: Image architecture ($image_arch) doesn't match host architecture ($host_arch)"
echo "Rebuilding image for correct architecture..."
else
echo "Image $image already exists and has been downloaded with correct architecture." && exit
fi
else
echo "Image $image already exists and has been downloaded." && exit
fi
else
echo "Image $image does not exist, building..."
fi
github_group "image-aztec"
source $ci3/source_tmp
Expand Down