Skip to content

Follow up to tracing #664

Follow up to tracing

Follow up to tracing #664

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
env:
RUST_BACKTRACE: 1
toolchain_style: stable
toolchain_msrv: 1.63
toolchain_h3_quinn_msrv: 1.66
toolchain_doc: nightly-2023-10-21
toolchain_lint: stable
toolchain_fuzz: nightly-2023-10-21
jobs:
ci-pass:
name: CI is green
runs-on: ubuntu-latest
needs:
- style
- lint
- msrv
- msrv_h3_quinn
- test
- doc
- fuzz
steps:
- run: exit 0
style:
name: Check Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_style }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_style }}
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: cargo fmt --all -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_lint }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_lint }}
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
msrv:
name: Check MSRV
needs: [style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_msrv }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_msrv }}
override: true
- uses: Swatinem/rust-cache@v2
- name: cargo check -p h3
uses: actions-rs/cargo@v1
with:
command: check
args: -p h3
msrv_h3_quinn:
name: Check MSRV of `h3-quinn`
needs: [style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_h3_quinn_msrv }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_h3_quinn_msrv }}
override: true
- uses: Swatinem/rust-cache@v2
- name: cargo check -p h3-quinn
uses: actions-rs/cargo@v1
with:
command: check
args: -p h3-quinn
test:
name: Test ${{ matrix.toolchain }} ${{ matrix.os }}
needs: [style]
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [stable, beta]
features: [i-implement-a-third-party-backend-and-opt-into-breaking-changes, tracing, 'tracing,i-implement-a-third-party-backend-and-opt-into-breaking-changes']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- uses: Swatinem/rust-cache@v2
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --features ${{ matrix.features }}
- name: h3Spec
run: ./ci/h3spec.sh
if: matrix.toolchain == 'stable'
doc:
name: Build docs
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_doc }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_doc }}
override: true
- uses: Swatinem/rust-cache@v2
- name: cargo rustdoc -p h3 -- -D intra-doc-link-resolution-failure
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: -p h3 -- -D intra-doc-link-resolution-failure
fuzz:
name: Fuzz test
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.toolchain_fuzz }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.toolchain_fuzz }}
override: true
- uses: Swatinem/rust-cache@v2
- name: Install cargo-fuzz
uses: camshaft/install@v1
with:
crate: cargo-fuzz
- name: cargo fuzz run fuzz_varint -- -runs=1
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run fuzz_varint -- -runs=1
compliance:
name: Compliance report
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Generate compliance report
uses: ./.github/actions/compliance
with:
extract-script: ${{ github.workspace }}/ci/compliance/extract.sh
report-script: ${{ github.workspace }}/ci/compliance/report.sh