riscu 0.5.0

A simple library for loading/encoding RISC-U ELF64 binaries
Documentation
name: Test

on:
  push:
  workflow_dispatch:

env:
  RUST_BACKTRACE: 1
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:
    name: Build and Test
    runs-on: ${{ matrix.os }} 
    strategy:
      matrix: 
        os: [ubuntu-latest, macos-latest, windows-latest]
        toolchain: [1.50.0]
        experimental: [false]
        include:
          - os: ubuntu-latest
            toolchain: stable
            experimental: true
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
            fetch-depth: 0
            persist-credentials: false

      - name: Install Rust ${{ matrix.toolchain }}
        uses: actions-rs/toolchain@v1
        with:
            profile: minimal
            toolchain: ${{ matrix.toolchain }}
            components: rustfmt, clippy
            override: true

      - name: Check Format
        uses: actions-rs/cargo@v1
        with:
            command: fmt
            args: -- --check

      - name: Clippy
        uses: actions-rs/clippy-check@v1
        # execute Clippy with Github integration for the target platform (Linux with fixed toolchain version)
        if: ${{ contains(matrix.os, 'ubuntu') && !matrix.experimental }}
        with:
            token: ${{ secrets.GITHUB_TOKEN }}
            args: --all-targets --all-features -- -D warnings
            name: Clippy

      - name: Clippy CLI only 
        uses: actions-rs/cargo@v1
        # execute CLI-only version of Clippy for all platforms besides the target platform
        if: ${{ !(contains(matrix.os, 'ubuntu') && !matrix.experimental) }}
        with:
            command: clippy
            args: --all-targets --all-features -- -D warnings

      - name: Build
        uses: actions-rs/cargo@v1
        with:
            command: build

      - name: Doc
        uses: actions-rs/cargo@v1
        with:
            command: doc

      - name: Test
        uses: actions-rs/cargo@v1
        # sadly selfie does not work on Windows, so we can't execute tests on Windows
        # also Docker is not available in Github virtual runners, so that can be tested either
        if: ${{ contains(matrix.os, 'ubuntu') }}
        with:
            command: test