@@ -0,0 +1,79 @@
1+# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
2+#
3+# While our "example" application has the platform-specific code,
4+# for simplicity we are compiling and testing everything on the Ubuntu environment only.
5+# For multi-OS testing see the `cross.yml` workflow.
6+
7+on: [push, pull_request]
8+
9+name: Build
10+
11+jobs:
12+ check:
13+ name: Check
14+ runs-on: ubuntu-latest
15+ steps:
16+ - name: Checkout sources
17+ uses: actions/checkout@v2
18+
19+ - name: Install stable toolchain
20+ uses: actions-rs/toolchain@v1
21+ with:
22+ profile: minimal
23+ toolchain: stable
24+ override: true
25+
26+ - name: Run cargo check
27+ uses: actions-rs/cargo@v1
28+ continue-on-error: true # WARNING: only for this example, remove it!
29+ with:
30+ command: check
31+
32+ test:
33+ name: Test Suite
34+ runs-on: ubuntu-latest
35+ steps:
36+ - name: Checkout sources
37+ uses: actions/checkout@v2
38+
39+ - name: Install stable toolchain
40+ uses: actions-rs/toolchain@v1
41+ with:
42+ profile: minimal
43+ toolchain: stable
44+ override: true
45+
46+ - name: Run cargo test
47+ uses: actions-rs/cargo@v1
48+ continue-on-error: true # WARNING: only for this example, remove it!
49+ with:
50+ command: test
51+
52+ lints:
53+ name: Lints
54+ runs-on: ubuntu-latest
55+ steps:
56+ - name: Checkout sources
57+ uses: actions/checkout@v2
58+
59+ - name: Install stable toolchain
60+ uses: actions-rs/toolchain@v1
61+ with:
62+ profile: minimal
63+ toolchain: stable
64+ override: true
65+ components: rustfmt, clippy
66+
67+ - name: Run cargo fmt
68+ uses: actions-rs/cargo@v1
69+ continue-on-error: true # WARNING: only for this example, remove it!
70+ with:
71+ command: fmt
72+ args: --all -- --check
73+
74+ - name: Run cargo clippy
75+ uses: actions-rs/cargo@v1
76+ continue-on-error: true # WARNING: only for this example, remove it!
77+ with:
78+ command: clippy
79+ args: -- -D warnings