-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.28 KB
/
ci.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
57
58
name: ci
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
env:
CARGO_TERM_COLOR: always
# Loosely based on
# https://github.com/nushell/nushell/blob/8771872d861eeb94eec63051cb4938f6306d1dcd/.github/workflows/ci.yml
# https://www.reillywood.com/blog/rust-faster-ci/
jobs:
fmt-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.81
components: rustfmt,clippy
- name: cargo fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy
- name: clippy of tests
run: cargo clippy --tests
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.81
- name: default
run: cargo test
- name: serde
run: cargo test --features serde
- name: f32
run: cargo test --features f32
- name: left
run: cargo test --features left
- name: fake_exp
run: cargo test --features fake_exp