-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.09 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "50 6 * * *"
workflow_dispatch:
env:
RUST_TOOLCHAIN: stable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
features: ['', 'std', 'os', 'zeroconf', 'async-io-mini']
steps:
- name: Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy, rust-src
- name: Install libdbus
run: sudo apt-get install -y libdbus-1-dev
- name: Checkout
uses: actions/checkout@v3
- name: Fmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --no-deps --no-default-features --features ${{matrix.features}} -- -Dwarnings
- name: Build
run: cargo build --no-default-features --features ${{matrix.features}}
- name: Examples
if: matrix.features == 'os'
run: cargo build --examples --features ${{matrix.features}}