crossbeam 0.8.0

Tools for concurrent programming
Documentation
name: CI
on:
  pull_request:
  push:
    branches:
      - master
      - staging
      - trying

env:
  RUSTFLAGS: -Dwarnings
  RUST_BACKTRACE: 1

defaults:
  run:
    shell: bash

jobs:
  # Test crates on their minimum Rust versions and nightly Rust.
  test:
    name: test
    env:
      RUST_VERSION: ${{ matrix.rust }}
    strategy:
      matrix:
        crates:
          - crossbeam
          - crossbeam-channel
          - crossbeam-deque
          - crossbeam-epoch
          - crossbeam-queue
          - crossbeam-skiplist
          - crossbeam-utils
        rust:
          - 1.36.0
          - nightly
        os:
         - ubuntu-latest
         - windows-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
      - name: Test
        run: ./ci/${{ matrix.crates }}.sh

  # Check all feature combinations works properly.
  check-features:
    name: check-features
    env:
      RUST_VERSION: ${{ matrix.rust }}
    strategy:
      matrix:
        rust:
          - 1.36.0
          - nightly
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
      - name: Add targets
        if: matrix.rust == 'nightly'
        run: |
          rustup target add thumbv7m-none-eabi
          rustup target add thumbv6m-none-eabi
      - name: Check features
        run: . ./ci/check-features.sh

  # Check for duplicate dependencies.
  dependencies:
    name: dependencies
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        run: rustup update nightly && rustup default nightly
      - name: dependency tree check
        run: ./ci/dependencies.sh

  # Check formatting.
  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        run: rustup update stable && rustup default stable
      - name: rustfmt
        run: ./ci/rustfmt.sh

  # Check clippy.
  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        run: rustup update stable && rustup default stable
      - name: clippy
        run: ./ci/clippy.sh

  # These jobs don't actually test anything, but they're used to tell bors the
  # build completed, as there is no practical way to detect when a workflow is
  # successful listening to webhooks only.
  #
  # ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

  ci-success:
    name: ci
    if: github.event_name == 'push' && success()
    needs:
      - test
      - dependencies
      - rustfmt
      - clippy
    runs-on: ubuntu-latest
    steps:
      - name: Mark the job as a success
        run: exit 0
  ci-failure:
    name: ci
    if: github.event_name == 'push' && !success()
    needs:
      - test
      - dependencies
      - rustfmt
      - clippy
    runs-on: ubuntu-latest
    steps:
      - name: Mark the job as a failure
        run: exit 1