tryrun 0.5.3

This crate is no longer maintained.
name: CI
on:
  push:
    branches-ignore: [dependabot/**, master]
  pull_request:
  schedule:
    - cron: 0 2 * * *

env:
  GIT_SSL_VERSION: tlsv1.2
  http_proxy: 0.0.0.0
  RUST_BACKTRACE: 1
  CARGO_INCREMENTAL: 0
  CARGO_NET_OFFLINE: true
  CARGO_PROFILE_DEV_DEBUG: 1
  CARGO_PROFILE_RELEASE_DEBUG: 1
  CARGO_PROFILE_TEST_DEBUG: 1
  CARGO_PROFILE_BENCH_DEBUG: 1
  CARGO_TERM_COLOR: always
  CARGO_TERM_VERBOSE: true
  TERM: xterm-256color

jobs:
  test:
    timeout-minutes: 20
    strategy:
      matrix:
        os: [ubuntu-20.04, windows-2019, macos-10.15]
        toolchain: [nightly, beta, stable]
    runs-on: ${{matrix.os}}
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{matrix.toolchain}}
          components: clippy
          override: true
      - uses: actions-rs/toolchain@v1
        if: runner.os == 'Linux' && matrix.toolchain == 'beta'
        with:
          toolchain: ${{matrix.toolchain}}
          components: rustfmt
      - name: cargo fmt
        uses: actions-rs/cargo@v1
        if: runner.os == 'Linux' && matrix.toolchain == 'beta'
        with:
          command: fmt
          args: -- --check --color=always -v
      - name: cargo clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets
      - name: cargo clippy --release
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --release --all-targets
      - uses: actions-rs/toolchain@v1
        if: runner.os == 'Linux'
        with:
          toolchain: ${{matrix.toolchain}}
          target: i686-unknown-linux-musl
      - name: cargo clippy --target=i686-unknown-linux-musl
        if: runner.os == 'Linux'
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets --target=i686-unknown-linux-musl
      - uses: actions-rs/toolchain@v1
        if: runner.os == 'Windows'
        with:
          toolchain: ${{matrix.toolchain}}
          target: i686-pc-windows-msvc
      - name: cargo clippy --target=i686-pc-windows-msvc
        if: runner.os == 'Windows'
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets --target=i686-pc-windows-msvc
      - name: cargo build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets
      - name: Clone Miri repository
        if: runner.os != 'Windows'
        uses: actions/checkout@v2
        with:
          repository: rust-lang/miri
          path: target/miri-src
      - name: cargo install rustup-toolchain-install-master
        if: runner.os != 'Windows'
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: rustup-toolchain-install-master
        env:
          CARGO_NET_OFFLINE: false
      - name: Install Miri
        if: runner.os != 'Windows'
        run: |
          ./rustup-toolchain
          # Workaround that the output of `cargo miri setup` seems to contains a newline
          # at the beginning if it builds a new sysroot.
          ./miri run -vV
          ./miri install
          MIRI_SYSROOT=$(cargo miri setup --print-sysroot)
          echo "MIRI_SYSROOT=$MIRI_SYSROOT" >>"$GITHUB_ENV"
        working-directory: target/miri-src
        env:
          CARGO_NET_OFFLINE: false
        shell: bash
      - name: cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: -- --color=always
      - name: cargo build --target=i686-unknown-linux-musl
        if: runner.os == 'Linux'
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --target=i686-unknown-linux-musl
      - name: cargo test --target=i686-unknown-linux-musl
        if: runner.os == 'Linux'
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --target=i686-unknown-linux-musl -- --color=always
      - name: cargo build --target=i686-pc-windows-msvc
        if: runner.os == 'Windows'
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --target=i686-pc-windows-msvc
      - name: cargo test --target=i686-pc-windows-msvc
        if: runner.os == 'Windows'
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --target=i686-pc-windows-msvc -- --color=always
      - name: cargo build --release
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --release
      - name: cargo test --release
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release -- --color=always
      - run: |
          for file in tests/ui/*.{stdout,stderr}; do
            rm "$file"
          done
        shell: bash
        if: runner.os != 'Windows' # FIXME: We disabled Miri tests on Windows.
      - name: cargo test --release (bless)
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release -- --color=always
        env:
          TRYRUN: bless
      - run: exec git diff --exit-code --color HEAD
        shell: bash
      - name: cargo package
        uses: actions-rs/cargo@v1
        with:
          command: package
      - name: cargo deadlinks
        uses: hyd-dev/github-actions/cargo-deadlinks@HEAD
      - name: cargo deadlinks (release profile)
        uses: hyd-dev/github-actions/cargo-deadlinks@HEAD
        with:
          cargo-args: --release
  diff-check:
    timeout-minutes: 1
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - uses: hyd-dev/github-actions/diff-check@HEAD
  report-status:
    needs: [test, diff-check]
    timeout-minutes: 1
    runs-on: ubuntu-20.04
    if: '!success()'
    steps:
      - run: false