-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 871 Bytes
/
rust.yml
File metadata and controls
34 lines (32 loc) · 871 Bytes
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
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.toolchain }}-
- run: cargo build --verbose
- run: cargo test --verbose