-
-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (49 loc) · 1.6 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
name: 'sntpc test'
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clippy with std
run: cargo clippy --no-default-features --features="std log utils" -- -D clippy::all -D clippy::pedantic
- name: Run clippy with no_std
run: cargo clippy --no-default-features --features="log" -- -D clippy::all -D clippy::pedantic
- name: Run clippy for tokio feature
run: cargo clippy --features="tokio" -- -D clippy::all -D clippy::pedantic
clippy_async_no_std:
runs-on: ubuntu-latest
container:
image: rust:latest
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
run: rustup toolchain add nightly
- name: Install clippy
run: rustup component add clippy --toolchain nightly
- name: Run clippy for async feature
run: cargo +nightly clippy --no-default-features --features="async" -- -D clippy::all -D clippy::pedantic
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: cargo fmt --check
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build with std
run: cargo build --all --no-default-features --features="std utils"
- name: Build with no_std
run: cargo build --all --no-default-features
- name: Run tests with std
run: cargo test
- name: Run tests with no_std
run: cargo test --no-default-features