Closed zwilias closed 4 years ago
language: rust
cache: cargo
addons:
apt:
packages:
- musl-tools
env:
global:
- TARGET=armv7-unknown-linux-musleabihf
- CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gcc
- TOOLCHAIN=armv7-eabihf--musl--stable-2018.11-1
- TOOLCHAIN_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/"
- CC_armv7_unknown_linux_musleabihf=arm-linux-gcc
- CXX_armv7_unknown_linux_musleabihf=arm-linux-g++
- LD_armv7_unknown_linux_musleabihf=arm-linux-ld
before_script:
- curl -o- ${TOOLCHAIN_URL}/${TOOLCHAIN}.tar.bz2 | tar -xjf -
- rustup target add $TARGET
script:
- ls ${TRAVIS_BUILD_DIR}/${TOOLCHAIN}/bin
- PATH="${PATH}:${TRAVIS_BUILD_DIR}/${TOOLCHAIN}/bin" RUSTFLAGS="-C link-arg=-s" cargo build --release --target $TARGET --locked
seems to work!
Done in 1e608a5ae13e2ca0963e1ac95ec36ff38cd790da
The following travis config gets fairly close:
but ultimately still result in build failure, however, that's probably because of something I did: https://travis-ci.org/zwilias/elm-json/jobs/621652061