mirror of
https://github.com/seemueller-io/hyper-custom-cert.git
synced 2025-09-08 22:46:45 +00:00
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: Documentation
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
docs:
|
|
name: Build and validate documentation
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: crates/hyper-custom-cert
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: default-features
|
|
features: ""
|
|
no-default-features: false
|
|
- name: no-default-features
|
|
features: ""
|
|
no-default-features: true
|
|
- name: rustls
|
|
features: "rustls"
|
|
no-default-features: true
|
|
- name: insecure-dangerous
|
|
features: "insecure-dangerous"
|
|
no-default-features: false
|
|
- name: all-features
|
|
features: "rustls,insecure-dangerous"
|
|
no-default-features: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Setup Rust
|
|
run: rustup update stable && rustup default stable
|
|
|
|
- name: Build documentation
|
|
shell: bash
|
|
run: |
|
|
FLAGS=""
|
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
|
echo "Running: cargo doc $FLAGS --no-deps"
|
|
cargo doc $FLAGS --no-deps
|
|
|
|
- name: Check documentation warnings
|
|
shell: bash
|
|
run: |
|
|
FLAGS=""
|
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
|
echo "Running: cargo doc $FLAGS --no-deps"
|
|
RUSTDOCFLAGS="-D warnings" cargo doc $FLAGS --no-deps
|
|
|
|
- name: Test documentation examples
|
|
shell: bash
|
|
run: |
|
|
FLAGS=""
|
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
|
echo "Running: cargo test --doc $FLAGS"
|
|
cargo test --doc $FLAGS |