Skip to content

Commit ce1e30c

Browse files
committed
Github actions
1 parent 5ee4154 commit ce1e30c

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rust:
7+
name: Rust
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
toolchain: ["stable"]
13+
14+
runs-on: ${{ matrix.os }}
15+
16+
env:
17+
CARGO_INCREMENTAL: 0
18+
RUST_BACKTRACE: 1
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v1
23+
24+
- name: Install Rust toolchain
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
toolchain: ${{ matrix.toolchain }}
28+
profile: minimal
29+
default: true
30+
31+
- name: Build (secure)
32+
uses: actions-rs/cargo@v1
33+
with:
34+
command: build
35+
36+
- name: Test (secure)
37+
uses: actions-rs/cargo@v1
38+
with:
39+
command: test
40+
args: --no-default-features
41+
42+
- name: Build (no secure)
43+
uses: actions-rs/cargo@v1
44+
with:
45+
command: build
46+
args: --no-default-features
47+
48+
- name: Test (no secure)
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: test
52+
args: --no-default-features
53+
54+
lint:
55+
name: Rustfmt / Clippy
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- uses: actions/checkout@v1
60+
61+
- uses: actions-rs/toolchain@v1
62+
with:
63+
profile: minimal
64+
toolchain: stable
65+
components: rustfmt, clippy
66+
67+
- name: Fmt
68+
uses: actions-rs/cargo@v1
69+
with:
70+
command: fmt
71+
args: --all -- --check
72+
73+
- name: Clippy
74+
uses: actions-rs/cargo@v1
75+
with:
76+
command: clippy

0 commit comments

Comments
 (0)