From 5325d563aa7307854683d3ed65e2937c14853b91 Mon Sep 17 00:00:00 2001 From: Johannes Hoff Date: Wed, 27 Sep 2023 18:40:14 +0200 Subject: [PATCH] Build for both x86_64 and ARM --- .travis.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1443c0..859340c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ rust: - beta - nightly +arch: + - amd64 + - arm64 + matrix: allow_failures: - rust: nightly @@ -13,11 +17,12 @@ before_install: - sudo apt-get install -y musl-tools script: -- rustup target add x86_64-unknown-linux-musl -- cargo test --target=x86_64-unknown-linux-musl -- cargo build --release --target=x86_64-unknown-linux-musl -- strip -s target/x86_64-unknown-linux-musl/release/sausagewiki -- XZ_OPT=-9 tar Jcf sausagewiki.tar.xz -C target/x86_64-unknown-linux-musl/release/ sausagewiki +- TARGET=`[ $TRAVIS_CPU_ARCH == 'amd64' ] && echo x86_64 || echo aarch64`-unknown-linux-musl +- rustup target add $TARGET +- cargo test --target=$TARGET +- cargo build --release --target=$TARGET +- strip -s target/$TARGET/release/sausagewiki +- XZ_OPT=-9 tar Jcf sausagewiki-$TRAVIS_CPU_ARCH.tar.xz -C target/$TARGET/release/ sausagewiki branches: except: