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

name: Continuous integration

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0

jobs:
  tests:
    runs-on: ubuntu-latest
    continue-on-error: true
    strategy:
      matrix:
        include:
          - rust: 1.51.0 # MSRV
            features: serde
          - rust: stable
            features:
          - rust: beta
            features: serde
          - rust: nightly
            features: serde unstable-const-fn

    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Tests
        run: |
          cargo build --verbose --features "${{ matrix.features }}"
          cargo doc --verbose --features "${{ matrix.features }}" --no-deps
          cargo test --verbose --features "${{ matrix.features }}"
          cargo test --release --verbose --features "${{ matrix.features }}"
      - name: Test run benchmarks
        if: matrix.bench != ''
        run: cargo test -v --benches

  miri:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Miri
        run: ci/miri.sh


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

name: Continuous integration

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0

jobs:
  tests:
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      matrix:
        include:
          - rust: 1.51.0 # MSRV
            features: serde
            experimental: false
          - rust: stable
            features:
            experimental: false
          - rust: beta
            features: serde
            experimental: false
          - rust: nightly
            features: serde
            experimental: false
          - rust: nightly
            features: serde unstable-const-fn
            experimental: true

    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Tests
        run: |
          cargo build --verbose --features "${{ matrix.features }}"
          cargo doc --verbose --features "${{ matrix.features }}" --no-deps
          cargo test --verbose --features "${{ matrix.features }}"
          cargo test --release --verbose --features "${{ matrix.features }}"
      - name: Test run benchmarks
        if: matrix.bench != ''
        run: cargo test -v --benches

  miri:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Miri
        run: ci/miri.sh


Update CI to use experimental/continue on error only for nigthly features
TEST: Update CI to use experimental/continue on error only for nigthly features
