inline-c 0.1.2

Write and execute C code inside Rust
Documentation
name: Build and Test

on: [push, pull_request]

jobs:
  # The `test` job.
  test:
    name: Test

    strategy:
      matrix:
        target: [
          ubuntu-latest,
          macos-latest,
          windows-latest
        ]
      fail-fast: false

    runs-on: ${{ matrix.target }}

    steps:
      - name: Check out code
        uses: actions/checkout@v2

      - name: Set up Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          default: true
          override: true

      - name: Cache Cargo registry
        uses: actions/cache@v1
        with:
          path: ~/.cargo/registry
          key: ${{ matrix.target }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache Cargo bin
        uses: actions/cache@v1
        with:
          path: ~/.cargo/bin
          key: ${{ matrix.target }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache Cargo build
        uses: actions/cache@v1
        with:
          path: target
          key: ${{ matrix.target }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

      - name: Run the tests
        shell: bash
        run: |
          cargo build --release
          cargo test --release -- --nocapture