name: Build
on:
push:
branches:
- "**"
pull_request:
branches:
- main
- "release/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
name: build (${{ matrix.os }} / ${{ matrix.tls }})
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, ubuntu-latest ]
tls: [ rustls-aws-lc, rustls-ring, native-tls ]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
make libfontconfig1-dev pkg-config build-essential libssl-dev
- name: Build --all-targets (${{ matrix.tls }})
run: cargo build --all-targets --no-default-features --features ${{ matrix.tls
}}
mutex-check:
runs-on: ubuntu-latest
name: mutex-check (rustls-aws-lc + rustls-ring)
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
make libfontconfig1-dev pkg-config build-essential
- name: Confirm the TLS mutex rejects two simultaneous backends
run: |
set -eu
if cargo build --no-default-features \
--features "rustls-aws-lc,rustls-ring" 2>build.log
then
echo "::error::build should have failed with compile_error!"
echo "---- build log ----"
cat build.log
exit 1
fi
if ! grep -q "select exactly one TLS backend" build.log
then
echo "::error::expected mutex diagnostic missing from build output"
echo "---- build log ----"
cat build.log
exit 1
fi
echo "mutex correctly rejected the double-backend build"
rustdoc:
runs-on: ubuntu-latest
name: rustdoc (-D warnings)
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
make libfontconfig1-dev pkg-config build-essential
- name: cargo doc --features integration-tests
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --features integration-tests