retour 0.3.1

A cross-platform detour library written in Rust
Documentation
name: Cargo Check/Tests

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

jobs:
  test:
    strategy:
      matrix:
        target:
          - os: windows-latest
            triple: i686-pc-windows-msvc
          - os: windows-latest
            triple: x86_64-pc-windows-msvc
          # Use because of broken GH Action
          # https://github.com/egor-tensin/setup-mingw/issues/6#issuecomment-1215265290
          - os: windows-2019
            triple: i686-pc-windows-gnu
          - os: windows-2019
            triple: x86_64-pc-windows-gnu
          
          - os: ubuntu-latest
            triple: x86_64-unknown-linux-gnu
          # - os: ubuntu-latest
          #   triple: x86_64-unknown-linux-musl
          #   rustflags: RUSTFLAGS="-C target-feature=-crt-static"
          - os: ubuntu-latest
            triple: i686-unknown-linux-gnu
          
          # - os: macos-latest
          #   triple: i686-apple-darwin
          # - os: macos-latest
          #   triple: x86_64-apple-darwin

    runs-on: ${{ matrix.target.os }}
    steps:
      - uses: actions/checkout@v2

      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: nightly
          targets: ${{ matrix.target.triple }}
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          targets: ${{ matrix.target.triple }}
      # Install linux deps
      - if: matrix.target.os == 'ubuntu-latest'
        run: sudo apt-get update && sudo apt-get install gcc-multilib
      # Install linux deps
      # - if: matrix.target.triple == 'x86_64-unknown-linux-musl'
      #   run: sudo apt-get install musl-tools
            # Windows mingw 64bit
      - if: matrix.target.triple == 'x86_64-pc-windows-gnu'
        name: Set up MinGW
        uses: egor-tensin/setup-mingw@v2
        with:
          platform: x64
      # Windows mingw 32bit
      - if: matrix.target.triple == 'i686-pc-windows-gnu'
        name: Set up MinGW
        uses: egor-tensin/setup-mingw@v2
        with:
          platform: x86
      
      - name: Cargo Check - Default Features Only
        run: ${{ matrix.target.rustflags }} cargo check --target ${{ matrix.target.triple }}
      
      - name: Cargo Check - All Features
        run: ${{ matrix.target.rustflags }} cargo +nightly check --target ${{ matrix.target.triple }} --all-features

      - name: Cargo Tests - Stable
        run: ${{ matrix.target.rustflags }} cargo test --target ${{ matrix.target.triple }}
      
      - name: Cargo Tests - Nightly
        run: ${{ matrix.target.rustflags }} cargo +nightly test --target ${{ matrix.target.triple }} --all-features