You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
epd-waveshare/.travis.yml

126 lines
4.1 KiB
YAML

5 years ago
# Based on the "trust" template v0.1.2
# https://github.com/japaric/trust/tree/v0.1.2
language: rust
rust:
- stable
- beta
5 years ago
- nightly
5 years ago
sudo: required
env: TARGET=x86_64-unknown-linux-gnu
5 years ago
# TODO Rust builds on stable by default, this can be
# overridden on a case by case basis down below.
matrix:
allow_failures:
- rust: nightly
4 years ago
- name: clippy
fast_finish: true
5 years ago
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
include:
# Linux
#- env: TARGET=aarch64-unknown-linux-gnu
5 years ago
# Raspberry Pi
- env: TARGET=arm-unknown-linux-gnueabi
5 years ago
# Raspberry Pi 3...
- env: TARGET=armv7-unknown-linux-gnueabihf
# is already included as global env
#- env: TARGET=x86_64-unknown-linux-gnu
5 years ago
- env: TARGET=x86_64-unknown-linux-musl
# Bare metal
# These targets don't support std and as such are likely not suitable for
# most crates.
5 years ago
- env: TARGET=thumbv6m-none-eabi
before_script: rustup target add $TARGET
script: cargo check --verbose --target $TARGET
5 years ago
- env: TARGET=thumbv7em-none-eabi
before_script: rustup target add $TARGET
script: cargo check --verbose --target $TARGET
5 years ago
- env: TARGET=thumbv7em-none-eabihf
before_script: rustup target add $TARGET
script: cargo check --verbose --target $TARGET
5 years ago
- env: TARGET=thumbv7m-none-eabi
before_script: rustup target add $TARGET
script: cargo check --verbose --target $TARGET
5 years ago
4 years ago
- name: "fmt"
rust: stable
env: RUN=FMT
before_script:
4 years ago
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
- cargo doc --all-features --release
- cd examples/epd4in2_full && cargo fmt --all -- --check && cd ../../
- cd examples/epd2in9_full && cargo fmt --all -- --check && cd ../../
- cd examples/epd1in54_full && cargo fmt --all -- --check && cd ../../
- cd examples/epd1in54_no_graphics && cargo fmt --all -- --check && cd ../../
- cd examples/epd4in2_var_display_buffer && cargo fmt --all -- --check && cd ../../
- cd examples/epd4in2_full_blue_pill && cargo fmt --all -- --check && cd ../../
4 years ago
- name: "clippy"
rust: stable
env: RUN=FMT
before_script:
- rustup component add clippy
script:
- cargo clippy --all-targets --all-features -- -D warnings -A clippy::new_ret_no_self
- name: "check examples"
rust: stable
before_script:
- rustup target add thumbv7m-none-eabi
script:
- cd examples/epd4in2_full_blue_pill && cargo check && cd ../../
- cd examples/epd4in2_full && cargo check && cd ../../
- cd examples/epd2in9_full && cargo check && cd ../../
- cd examples/epd1in54_full && cargo check && cd ../../
- cd examples/epd1in54_no_graphics && cargo check && cd ../../
- cd examples/epd4in2_var_display_buffer && cargo check && cd ../../
- name
5 years ago
before_install:
- set -e
- rustup self update
install:
5 years ago
- cargo install cargo-update || echo "cargo-update already installed"
- cargo install-update -a # update outdated cached binaries
- cargo install cross || echo "cross already installed"
5 years ago
#TODO: remove -A clippy::new_ret_no_self when new version of clippy gets released!
5 years ago
script:
- cross check --verbose --target $TARGET
- cross test --all-features --release --verbose --target $TARGET
5 years ago
cache: cargo
before_cache:
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo
- |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
cargo install cargo-tarpaulin -f
fi
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
# Uncomment the following line for coveralls.io
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash) -t "$CODECOV_TOKEN"
fi
5 years ago
branches:
only:
# release tags
- /^v\d+\.\d+\.\d+.*$/
- master
notifications:
email:
on_success: never