Skip to content

amqp-rs/actions

Repository files navigation

actions

Shared composite GitHub Actions for the amqp-rs ecosystem.

Available actions

checkout

Checks out the repository. Thin wrapper around actions/checkout.

- uses: amqp-rs/actions/checkout@main

actionlint

Lints GitHub Actions workflow files with actionlint.

- uses: amqp-rs/actions/checkout@main
- uses: amqp-rs/actions/actionlint@main

lint

Runs clippy, rustfmt, and doc checks on stable Rust.

- uses: amqp-rs/actions/checkout@main
- uses: amqp-rs/actions/lint@main

security

Runs cargo audit via the RustSec advisory database.

- uses: amqp-rs/actions/checkout@main
- uses: amqp-rs/actions/security@main

semver

Checks semver compliance with cargo-semver-checks.

- uses: amqp-rs/actions/checkout@main
- uses: amqp-rs/actions/semver@main

build

Installs a Rust toolchain, sets up build caching, and runs cargo check and cargo test with RUSTFLAGS=-D warnings.

- uses: amqp-rs/actions/checkout@main
- uses: amqp-rs/actions/build@main
  with:
    rust: stable   # stable, nightly, beta, msrv, or an explicit version; default: stable
    check: 'true'  # set to 'false' to skip cargo check steps
    test: 'true'   # set to 'false' to skip cargo test
Input Default Description
rust stable Toolchain to install (stable, nightly, beta, msrv, or an explicit version such as 1.88.0); msrv reads rust-version from Cargo.toml
check true Run cargo check --all --bins --examples --tests --all-features (and the nightly -Z features=dev_dep variant)
test true Run cargo test

aws-lc-sys-deps

Installs NASM and ninja-build on Windows, required by aws-lc-rs and aws-lc-fips-sys. No-op on Linux and macOS.

- uses: amqp-rs/actions/aws-lc-sys-deps@main

openssl-no-vendor

Sets OPENSSL_NO_VENDOR=1 to prevent openssl-sys from building a bundled OpenSSL.

- uses: amqp-rs/actions/openssl-no-vendor@main

openssl-vcpkg

Sets VCPKG_ROOT and installs openssl:x64-windows-static-md via vcpkg on Windows. No-op on Linux and macOS.

- uses: amqp-rs/actions/openssl-vcpkg@main

windows-setup-tls-env

Combines aws-lc-sys-deps, openssl-vcpkg, and openssl-no-vendor in one step. Use this for crates that need all three (e.g. amq-protocol, tcp-stream, lapin).

- uses: amqp-rs/actions/windows-setup-tls-env@main

Typical workflow patterns

Standard crate (rustls / aws-lc-rs backend)

steps:
  - uses: amqp-rs/actions/checkout@main
  - uses: amqp-rs/actions/aws-lc-sys-deps@main
  - uses: amqp-rs/actions/build@main
    with:
      rust: ${{ matrix.rust }}

Crate with full TLS environment (amq-protocol, tcp-stream, lapin)

steps:
  - uses: amqp-rs/actions/checkout@main
  - uses: amqp-rs/actions/windows-setup-tls-env@main
  - uses: amqp-rs/actions/build@main
    with:
      rust: ${{ matrix.rust }}

OpenSSL crate

steps:
  - uses: amqp-rs/actions/checkout@main
  - uses: amqp-rs/actions/openssl-vcpkg@main
  - uses: amqp-rs/actions/build@main
    with:
      rust: ${{ matrix.rust }}

Crate requiring a service for tests (e.g. lapin + RabbitMQ)

Split into two jobs — check runs cross-platform, test runs Linux-only with the service:

jobs:
  check:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        rust: [stable]
        include:
          - { os: ubuntu-latest, rust: nightly }
          - { os: ubuntu-latest, rust: beta }
          - { os: ubuntu-latest, rust: msrv }
    steps:
      - uses: amqp-rs/actions/checkout@main
      - uses: amqp-rs/actions/build@main
        with:
          rust: ${{ matrix.rust }}
          test: 'false'

  test:
    runs-on: ubuntu-latest
    services:
      rabbitmq:
        image: rabbitmq:latest
        ports:
          - 5672:5672
    strategy:
      matrix:
        rust: [nightly, beta, stable, msrv]
    steps:
      - uses: amqp-rs/actions/checkout@main
      - uses: amqp-rs/actions/build@main
        with:
          rust: ${{ matrix.rust }}
          check: 'false'

About

Github actions shared across amqp-rs repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors