before_script:
  - apt-get update -qq
  - apt-get install -qq build-essential curl git
  - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
  - source "$HOME/.cargo/env"

linux:
  script:
    - cargo build
    - make tests
  cache:
    paths:
      - target

redox:
  variables:
    CC: "x86_64-unknown-redox-gcc"
  before_script:
    - apt-get update -qq
    - apt-get install -qq build-essential curl git gnupg software-properties-common
    - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
    - add-apt-repository 'deb https://static.redox-os.org/toolchain/apt /'
    - apt-get update -qq && apt-get install -qq x86-64-unknown-redox-gcc
    - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2018-07-18
    - source "$HOME/.cargo/env"
    - rustup target add x86_64-unknown-redox
  script:
    - cargo build --target x86_64-unknown-redox
  cache:
    paths:
      - target

image: 'rust:latest'

variables:
    CARGO_HOME: $CI_PROJECT_DIR/cargo
before_script:
  - apt-get update -qq
  - apt-get install -qq build-essential curl git

linux:
  script:
    - cargo build
    - make tests
  cache:
    paths:
      - cargo/
      - target/

redox:
  variables:
    CC: "x86_64-unknown-redox-gcc"
  before_script:
    - apt-get update -qq
    - apt-get install -qq build-essential curl git gnupg software-properties-common apt-transport-https
    - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
    - add-apt-repository 'deb https://static.redox-os.org/toolchain/apt /'
    - apt-get update -qq && apt-get install -qq x86-64-unknown-redox-gcc
    - rustup default nightly-2018-07-18
    - rustup target add x86_64-unknown-redox
  script:
    - cargo build --target x86_64-unknown-redox
  cache:
    paths:
      - cargo/
      - target/

Speed up ion CI builds
Speed up ion CI builds
