mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-25 19:11:08 +00:00
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"
|
require "$VERSION" "version"
|
||||||
|
|
||||||
if docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then
|
if ! docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo "docker is not configured to run on qemu-emulated architectures, fixing will require sudo"
|
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
|
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! which cross; then
|
||||||
|
cargo intall cross
|
||||||
|
fi
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
# from `cargo install cross`
|
|
||||||
cross build \
|
cross build \
|
||||||
--target aarch64-unknown-linux-musl \
|
--target aarch64-unknown-linux-musl \
|
||||||
--release
|
--release
|
||||||
|
@ -43,7 +44,6 @@ mkdir -p artifacts
|
||||||
rm -rf artifacts/relay
|
rm -rf artifacts/relay
|
||||||
cp ./target/aarch64-unknown-linux-musl/release/relay 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 \
|
docker build \
|
||||||
--pull \
|
--pull \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
|
|
Loading…
Reference in a new issue