-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (53 loc) · 1.52 KB
/
rust.yaml
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
name: Rust
on: [push]
jobs:
build:
name: Test-Clippy-Build
runs-on: ubuntu-22.04
steps:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install musl-dev musl-tools unzip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
sudo unzip -d /usr/local protoc-21.12-linux-x86_64.zip
- uses: actions/checkout@v3
name: Checkout code
with:
fetch-depth: 1
- uses: actions/cache@v3
name: create and restore dependency caches
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
name: Install toolchain
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- uses: actions-rs/cargo@v1
name: Check formatting
with:
command: fmt
args: -- --check
- name: Start Redis
uses: supercharge/[email protected]
- uses: actions-rs/cargo@v1
name: Run tests (ahm!)
with:
command: test
- uses: actions-rs/cargo@v1
name: Run clippy
with:
command: clippy
- uses: actions-rs/cargo@v1
name: Build
with:
toolchain: stable
command: build
args: --release