[go: up one dir, main page]

state 0.6.0

A library for safe and effortless global and thread-local state management.
Documentation
name: CI

on: [push, pull_request]

jobs:
  test:
    name: "${{ matrix.platform.name }} ${{ matrix.test.name }} (${{ matrix.platform.toolchain }})"

    strategy:
      matrix:
        platform:
          - { name: Linux, distro: ubuntu-latest, toolchain: stable }
          - { name: Windows, distro: windows-latest, toolchain: stable }
          - { name: macOS, distro: macOS-latest, toolchain: stable }
          - { name: Linux, distro: ubuntu-latest, toolchain: nightly }
        test:
          - { name: Default }
          - { name: Featured, args: "--all-features" }

    runs-on: ${{ matrix.platform.distro }}

    steps:
      - name: Checkout Sources
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.platform.toolchain }}
          override: true

      - name: Run Tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: ${{ matrix.test.args }}

  check-msrv:
    name: Check MSRV (1.61.0)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Sources
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: 1.61.0
          override: true

      - name: Check Compilation
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: --all --all-features

  loom-verify:
    name: Loom Verification
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Sources
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

      - name: Run Loom Verification
        uses: actions-rs/cargo@v1
        env:
          RUSTFLAGS: --cfg loom --cfg loom_nightly
        with:
          command: test
          args: --release --test loom

  miri-verify:
    name: Miri Verification
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Sources
        uses: actions/checkout@v2

      - name: Install Rust w/Miri
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          components: miri
          override: true

      - name: Run Miri Verification
        uses: actions-rs/cargo@v1
        env:
          MIRIFLAGS: -Zmiri-track-raw-pointers
        with:
          command: miri
          args: test