retina/.github/workflows/ci.yml

64 lines
1.7 KiB
YAML
Raw Normal View History

2021-06-04 03:26:45 +04:00
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
rust:
name: Test
strategy:
matrix:
rust:
- stable
- 1.59
2021-06-04 03:26:45 +04:00
include:
- rust: stable
extra_components: rustfmt
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: ${{ matrix.extra_components }}
- name: Build
run: cargo build --all-features --all-targets --workspace
2021-06-04 03:26:45 +04:00
- name: Test
run: cargo test --all-features --all-targets --workspace
- name: Check fuzz tests
run: cd fuzz && cargo check --workspace
2022-07-13 22:17:28 +04:00
- name: Check main workspace formatting
2021-06-04 03:26:45 +04:00
if: matrix.rust == 'stable'
2022-07-13 22:17:28 +04:00
run: cargo fmt --all --check
- name: Check fuzz worspace formatting
if: matrix.rust == 'stable'
2022-07-13 22:17:28 +04:00
run: cd fuzz && cargo fmt --all --check
- name: Clippy on main workspace
2022-02-01 02:06:01 +04:00
if: matrix.rust == 'stable'
run: cargo clippy --workspace -- -D warnings
2022-07-13 22:17:28 +04:00
- name: Clippy on fuzz workspace
2022-02-01 02:06:01 +04:00
if: matrix.rust == 'stable'
run: cd fuzz && cargo clippy --workspace -- -D warnings
2022-02-01 02:06:01 +04:00
2021-06-04 03:26:45 +04:00
license:
name: Check copyright/license headers
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py