-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (56 loc) · 1.57 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
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Auto Build CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [nightly, beta, stable]
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
override: true
- name: Install Dependencies (for ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libssl-dev
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Cargo Test For tokio
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features runtime-tokio rt
- name: Cargo Test For async-std
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features runtime-async-std
- name: Cargo Clippy
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Cargo Fmt Check
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly'
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check