zwilias / elm-json

Install, upgrade and uninstall Elm dependencies
MIT License
183 stars 9 forks source link

ARM builds #19

Closed zwilias closed 4 years ago

zwilias commented 4 years ago

The following travis config gets fairly close:

addons:
  apt:
    packages:
      - musl-tools
      - gcc-arm-linux-gnueabihf

matrix:
  include:
    - name: RPI
      env: TARGET=armv7-unknown-linux-musleabihf CC_armv7_unknown_linux_musleabihf=arm-linux-gnueabihf-gcc CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc

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

zwilias commented 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!

zwilias commented 4 years ago

Done in 1e608a5ae13e2ca0963e1ac95ec36ff38cd790da