forked from bytebeamio/rumqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.63 KB
/
build.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
59
60
on:
pull_request:
branches:
- master
paths:
- '**.rs'
- 'Cargo.*'
- '*/Cargo.*'
name: Build and Test
jobs:
test:
name: Build and test on ${{ matrix.os }} with ${{ matrix.features }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
features:
- --no-default-features
- --features use-rustls
- --no-default-features --features use-native-tls
- --all-features
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
override: true
profile: minimal
toolchain: stable
- name: Check benchmarks
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: "-D warnings"
# NOTE: benchmarks are limited to compiling only on non windows systems, without any features enabled.
if: ${{ matrix.os != 'windows-latest' && matrix.features == '--no-default-features' }}
with:
command: clippy
args: --verbose --all-targets -p benchmarks
- name: Check rumqttc and rumqttd
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: "-D warnings"
with:
command: clippy
args: --verbose --all-targets ${{ matrix.features }} -p rumqttc -p rumqttd
# NOTE: Tests for rumqttc and rumqttd
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --release ${{ matrix.features }} -p rumqttc -p rumqttd