name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose

name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Install Toolchain
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true
        target: riscv32imc-unknown-none-elf
        components: rustfmt

    - name: Check format
      run: cargo fmt -- --check --files-with-diff

    - name: Build with default settings
      run: cargo build --verbose
    - name: Build with features
      run: cargo build --verbose --all-features
    - name: Build for baremetal RISC-V
      run: cargo build --verbose --target riscv32imc-unknown-none-elf

    - name: Run tests
      run: cargo test --verbose

Add more checks to CI
[ci] Add more checks to CI

Signed-off-by: Miguel Young de la Sota <71b8e7f4945fd97b98544cf897992af89646547a@google.com>
