CI #1048
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: Install latest stable | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
# Build | |
- name: Build no features | |
run: cargo build --verbose --no-default-features | |
- name: Build alloc | |
run: cargo build --verbose --features alloc | |
- name: Build all features | |
run: cargo build --verbose --all-features | |
# Tests | |
- name: Run tests (no features) | |
run: cargo test --verbose --no-default-features | |
- name: Run tests (alloc, no std) | |
run: cargo test --verbose --no-default-features --features alloc | |
- name: Run tests (all features) | |
run: cargo test --verbose --all-features | |
# Benchmarks | |
- name: Run benchmarks | |
run: cargo bench --verbose --all-features | |
# Docs and Style | |
- name: Run doctests | |
if: success() || failure() | |
run: cargo test --doc | |
- uses: actions-rs/clippy-check@v1 | |
if: success() || failure() | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: -- -D warnings | |
- name: Run fmt | |
if: success() || failure() | |
run: cargo fmt --all -- --check |