trillium-cli 0.5.0

The trillium.rs cli
Documentation
name: CI

on:
  pull_request:
  push:
    branches:
      - main

# env:
#   RUSTFLAGS: -Dwarnings

jobs:
  test:
    name: Build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macOS-latest, ubuntu-latest, windows-latest]
        rust: [nightly, stable]
    steps:
    - name: get-cmake
      uses: lukka/get-cmake@v4.3.1
    - name: Install NASM for aws-lc-rs on Windows
      if: runner.os == 'Windows'
      uses: ilammy/setup-nasm@v1
    - uses: actions/checkout@master
    - name: Install ${{ matrix.rust }}
      uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ matrix.rust }}
        override: true
    - uses: actions/cache@v5
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

    # Apple's new linker (ld-prime) aborts with
    #   ld: Assertion failed: (name.size() <= maxLength), ... SymbolString.cpp
    # on this crate's very long monomorphized symbol names (only on the arm64
    # branch-reloc path, which is why local x86_64 builds link fine). lld has no
    # such limit, so use it for the macOS link step.
    - name: Use lld on macOS
      if: runner.os == 'macOS'
      run: |
        brew install lld
        echo "RUSTFLAGS=-Clink-arg=-fuse-ld=$(brew --prefix lld)/bin/ld64.lld" >> "$GITHUB_ENV"

    - name: Build (non-Windows)
      if: runner.os != 'Windows'
      uses: actions-rs/cargo@v1
      with:
        command: build
        args: --all-features

    - name: Build (Windows, no openssl)
      if: runner.os == 'Windows'
      uses: actions-rs/cargo@v1
      with:
        command: build
        args: --no-default-features --features serve,dev-server,client,bench,proxy,grpc,native-tls,rustls,h3

  feature-matrix:
    name: Feature powerset
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: -Dwarnings
    steps:
    - uses: actions/checkout@master
    - uses: dtolnay/rust-toolchain@stable
    - uses: taiki-e/install-action@cargo-hack
    - uses: Swatinem/rust-cache@v2.9.1
    # Check the powerset of subcommand and TLS features so a broken `#[cfg]`
    # combination can't slip through (each subcommand is feature-gated and the
    # default build won't exercise them all). `--at-least-one-of` skips the
    # useless no-subcommand builds; dev-server (unix-only) and grpc (codegen)
    # are covered by the `--all-features` build above.
    - name: cargo hack check --feature-powerset
      run:
        cargo hack check
        --feature-powerset --depth 3
        --exclude-features dev-server,grpc
        --at-least-one-of serve,client,bench,proxy
        --keep-going

  check_fmt_and_docs:
    name: Lints and Docs
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        components: clippy
        override: true
    - name: Install nightly rustfmt
      uses: actions-rs/toolchain@v1
      with:
        toolchain: nightly
        components: rustfmt

    - uses: giraffate/clippy-action@v1
      with:
        reporter: 'github-pr-review'
        github_token: ${{ secrets.GITHUB_TOKEN }}

    - name: Format
      run: cargo +nightly fmt -- --check