-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.43 KB
/
rust_validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Based on https://github.com/taiki-e/parse-changelog/blob/777a82184bcbe0ed975e63a491f5fbf80b29cb1b/.github/workflows/ci.yml
name: Rust CI
permissions:
contents: read
on:
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows other workflows to call this one
workflow_call:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
RUSTUP_MAX_RETRIES: 10
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustc, cargo, rustfmt, rust-std, clippy, rust-src, rust-analysis
- name: Check format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-features --all-targets
- name: Build
run: cargo build --verbose
- name: Build --no-default-features
run: cargo build --verbose --no-default-features
- name: Build --all-features
run: cargo build --verbose --all-features --all-targets
- name: Run tests
run: cargo test --verbose --lib --examples
- name: Run tests --all-features
run: cargo test --verbose --all-features --lib --examples