ruma-client 0.18.0

A Matrix client library.
Documentation
name: CI

env:
  CARGO_TERM_COLOR: always
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  NIGHTLY: nightly-2026-04-17

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  style:
    name: Style
    uses: ruma/ruma/.github/workflows/style.yml@main

  msrv:
    name: Minimum Supported Rust Version / Check All Features
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v6

      - name: Install MSRV toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.89"

      - uses: Swatinem/rust-cache@v2
        with:
          # A stable compiler update should automatically not reuse old caches.
          # Add the MSRV as a stable cache key too so bumping it also gets us a
          # fresh cache.
          shared-key: msrv1.89

      - name: Run checks
        run: cargo check --all-features

  stable:
    name: Rust Stable / ${{ matrix.name }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - name: Check All Features
            cmd: check --all-features

          - name: Check No Default Features
            cmd: check --no-default-features

          - name: Run Tests
            cmd: test --all-features

    steps:
      - name: Checkout repo
        uses: actions/checkout@v6

      - name: Install rust stable toolchain
        uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - name: Run checks
        run: cargo ${{ matrix.cmd }}

  nightly:
    name: Rust Nightly / ${{ matrix.name }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - name: Check Formatting
            cmd: fmt
            components: rustfmt

          - name: Check All Features
            cmd: check --all-features

          - name: Clippy Default Features
            cmd: clippy --all-targets -- -D warnings
            components: clippy

          - name: Clippy All Features
            cmd: clippy --all-features --all-targets -- -D warnings
            components: clippy

    steps:
      - name: Checkout repo
        uses: actions/checkout@v6

      - name: Install rust nightly toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ env.NIGHTLY }}
          components: ${{ matrix.components }}
          targets: ${{ matrix.targets }}

      - uses: Swatinem/rust-cache@v2

      - name: Run checks
        run: cargo ${{ matrix.cmd }}