Skip to content

Commit 95465b2

Browse files
authored
Merge pull request #164 from SirWindfield/github_actions
move ci to github actions
2 parents e8c3a5f + cd9a57b commit 95465b2

File tree

3 files changed

+115
-24
lines changed

3 files changed

+115
-24
lines changed

.github/workflows/ci.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**.rs"
7+
- "Cargo.toml"
8+
- "Cargo.lock"
9+
10+
jobs:
11+
fmt:
12+
name: Source formatting check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v2
17+
18+
- name: Install Rust toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: nightly
23+
override: true
24+
components: rustfmt
25+
26+
- name: Check formatting
27+
uses: actions-rs/cargo@v1
28+
with:
29+
command: fmt
30+
args: -- --check
31+
32+
check:
33+
name: Compilation check
34+
runs-on: ubuntu-latest
35+
strategy:
36+
fail-fast: true
37+
matrix:
38+
rust:
39+
- stable
40+
- beta
41+
- nightly
42+
- 1.41.0
43+
steps:
44+
- name: Checkout sources
45+
uses: actions/checkout@v2
46+
47+
- name: Install Rust toolchain
48+
uses: actions-rs/toolchain@v1
49+
with:
50+
profile: minimal
51+
toolchain: ${{ matrix.rust }}
52+
override: true
53+
54+
- name: Run cargo check
55+
uses: actions-rs/cargo@v1
56+
with:
57+
command: check
58+
59+
clippy:
60+
name: Lint check
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout sources
64+
uses: actions/checkout@v2
65+
66+
- name: Install Rust toolchain
67+
uses: actions-rs/toolchain@v1
68+
with:
69+
profile: minimal
70+
toolchain: stable
71+
override: true
72+
components: clippy
73+
74+
- name: Run lints
75+
uses: actions-rs/cargo@v1
76+
with:
77+
command: clippy
78+
args: -- -D warnings
79+
80+
ci-crate:
81+
name: CI crate check
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Checkout sources
85+
uses: actions/checkout@v2
86+
87+
- name: Install Rust toolchain
88+
uses: actions-rs/toolchain@v1
89+
with:
90+
profile: minimal
91+
92+
- name: Run ci crate
93+
uses: actions-rs/cargo@v1
94+
with:
95+
command: run
96+
args: -p ci
97+
98+
crate-example:
99+
name: Crate example check
100+
runs-on: ubuntu-latest
101+
steps:
102+
- name: Checkout sources
103+
uses: actions/checkout@v2
104+
105+
- name: Install Rust toolchain
106+
uses: actions-rs/toolchain@v1
107+
with:
108+
profile: minimal
109+
110+
- name: Run crate example
111+
uses: actions-rs/cargo@v1
112+
with:
113+
command: run
114+
args: --example default

.travis.yml

-24
This file was deleted.

rust-toolchain

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.41.0

0 commit comments

Comments
 (0)