71 lines
1.5 KiB
YAML
71 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: lo-runner
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- name: cargo fmt
|
|
run: cargo +nightly fmt --all --check
|
|
|
|
- name: cargo clippy
|
|
run: cargo +nightly clippy --all-targets --all-features --message-format=short
|
|
|
|
- name: cargo doc (no deps)
|
|
run: cargo +nightly doc --no-deps --document-private-items
|
|
env:
|
|
RUSTDOCFLAGS: "-D warnings"
|
|
|
|
test:
|
|
runs-on: lo-runner
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
with:
|
|
lfs: true
|
|
|
|
- name: cargo test
|
|
run: cargo test
|
|
|
|
fuzz-regression:
|
|
runs-on: lo-runner
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- name: Fuzz regression (decode_arbitrary)
|
|
working-directory: fuzz
|
|
run: cargo +nightly fuzz run decode_arbitrary -- -runs=0
|
|
|
|
- name: Fuzz regression (roundtrip_arbitrary)
|
|
working-directory: fuzz
|
|
run: cargo +nightly fuzz run roundtrip_arbitrary -- -runs=0
|
|
|
|
build:
|
|
runs-on: lo-runner
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- name: cargo build --release
|
|
run: cargo build --release
|
|
|
|
publish:
|
|
needs: [lint, test, fuzz-regression, build]
|
|
runs-on: lo-runner
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- name: Publish lac
|
|
run: cargo publish
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|