forked from mirrors/relay
Make build auto-setup cross
This commit is contained in:
parent
dd2658be82
commit
9e31fa5d3f
1 changed files with 5 additions and 5 deletions
10
build.sh
10
build.sh
|
@ -25,16 +25,17 @@ function print_help() {
|
|||
|
||||
require "$VERSION" "version"
|
||||
|
||||
if docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then
|
||||
echo ""
|
||||
else
|
||||
if ! docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then
|
||||
echo "docker is not configured to run on qemu-emulated architectures, fixing will require sudo"
|
||||
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
fi
|
||||
|
||||
if ! which cross; then
|
||||
cargo intall cross
|
||||
fi
|
||||
|
||||
set -xe
|
||||
|
||||
# from `cargo install cross`
|
||||
cross build \
|
||||
--target aarch64-unknown-linux-musl \
|
||||
--release
|
||||
|
@ -43,7 +44,6 @@ mkdir -p artifacts
|
|||
rm -rf artifacts/relay
|
||||
cp ./target/aarch64-unknown-linux-musl/release/relay artifacts/relay
|
||||
|
||||
# from `sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`
|
||||
docker build \
|
||||
--pull \
|
||||
--no-cache \
|
||||
|
|
Loading…
Reference in a new issue