language: rust
os: linux
sudo: required
cache: cargo
rust:
  - nightly

install:
  - if [[ ! -e $HOME/.cargo/bin/rustup ]]; then
      curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y;
    fi
  - source ~/.cargo/env
  - rustup install nightly
  - rustup default nightly
  - rustup component add rust-src
  - sudo apt-get install linux-headers-$(uname -r)
  - cargo install xargo || true
  - cargo install rustfmt || true
  - cargo install clippy --force

script:
  - make
  - make test
  - cargo clippy -- -D clippy || true
  - cargo fmt -- --write-mode diff
  - sudo insmod rustyvisor.ko
  - sudo rmmod rustyvisor.ko

language: rust
os: linux
sudo: required
cache: cargo
rust:
  - nightly

install:
  - if [[ ! -e $HOME/.cargo/bin/rustup ]]; then
      curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y;
      cargo install clippy --force;
    fi
  - source ~/.cargo/env
  - rustup install nightly
  - rustup default nightly
  - rustup component add rust-src
  - sudo apt-get install linux-headers-$(uname -r)
  - cargo install xargo || true
  - cargo install rustfmt || true

script:
  - make
  - make test
  - cargo clippy -- -D clippy || true
  - cargo fmt -- --write-mode diff
  - sudo insmod rustyvisor.ko
  - sudo rmmod rustyvisor.ko

Install clippy only if reinstalling rust
Install clippy only if reinstalling rust
