bytes-lit 0.0.6

Create byte slices from literal integers.
Documentation
name: Rust

on:
  push:
    branches: [main]
  pull_request:

jobs:

  complete:
    if: always()
    needs: [fmt, build-and-test, docs, publish-dry-run]
    runs-on: ubuntu-latest
    steps:
    - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
      run: exit 1

  fmt:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - run: rustup update
    - run: cargo fmt --all --check

  build-and-test:
    strategy:
      matrix:
        rust: [msrv, latest]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: stellar/actions/rust-cache@main
    - name: Use the minimum supported Rust version
      if: matrix.rust == 'msrv'
      run: |
        msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')"
        rustup override set $msrv
        rustup component add clippy --toolchain $msrv
    - name: Error on warnings and clippy checks
      # Only error on warnings and checks for the msrv, because new versions of
      # Rust will frequently add new warnings and checks.
      if: matrix.rust == 'msrv'
      run: echo RUSTFLAGS='-Dwarnings' >> $GITHUB_ENV
    - run: rustup update
    - run: cargo version
    - run: cargo clippy
    - run: cargo test

  docs:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: stellar/actions/rust-cache@main
    - run: rustup update
    - run: cargo doc

  publish-dry-run:
    if: startsWith(github.head_ref, 'release/')
    uses: stellar/actions/.github/workflows/rust-publish-dry-run.yml@main