-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.17 KB
/
build-test.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
name: build-test
on:
pull_request:
paths-ignore:
- "*.md"
push:
paths-ignore:
- "*.md"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install dependencies
run: |
sudo apt update &&
sudo apt install -y libssl-dev pkg-config unzip &&
wget -O /tmp/cargo-make.zip https://github.com/sagiegurari/cargo-make/releases/download/0.37.5/cargo-make-v0.37.5-x86_64-unknown-linux-gnu.zip &&
sudo unzip /tmp/cargo-make.zip -d /tmp &&
sudo mv /tmp/cargo-make-v0.37.5-x86_64-unknown-linux-gnu/cargo-make $HOME/.cargo/bin/cargo-make &&
sudo chmod +x $HOME/.cargo/bin/cargo-make
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets
- name: Test
run: cargo make test --profile development
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings