retina/.github/workflows/ci.yml
Scott Lamb 3b9c6b8719 bump minimum Rust version to 1.56
The last commit needs at least 1.53 for its use of array's IntoIterator
impl. We might as well bump up to 1.56 and take advantage of the 2021
edition.
2022-04-28 22:19:20 -07:00

61 lines
1.6 KiB
YAML

name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
rust:
name: Test
strategy:
matrix:
rust:
- stable
- 1.56
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: Test
run: cargo test --all-features --all-targets
- name: Check fuzz tests
run: cd fuzz && cargo check
- name: Check main crate formatting
if: matrix.rust == 'stable'
run: cargo fmt -- --check
- name: Check fuzz crate formatting
if: matrix.rust == 'stable'
run: cd fuzz && cargo fmt -- --check
- name: Clippy on main crate
if: matrix.rust == 'stable'
run: cargo clippy -- -D warnings
- name: Clippy on fuzz crate
if: matrix.rust == 'stable'
run: cd fuzz && cargo clippy -- -D warnings
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