-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (52 loc) · 1.41 KB
/
rust.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Rust
on:
push:
branches: [ "master", "ci" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Initialize Submodules
run: git submodule update --init --recursive
- name: Build
run: cargo build --verbose
- name: Tests
run: cargo test --verbose
- name: Clippy
run: cargo clippy ${{ matrix.build-args }} -- -D warnings
build-msrv-1660:
name: Windows
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.66.0 # MSRV
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Submodules
run: git submodule update --init --recursive
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-msrv-1.66.0-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Set default toolchain
run: rustup default ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal && rustup component add clippy
- name: Build
run: cargo build ${{ matrix.build-args }}
- name: Tests
run: cargo test ${{ matrix.build-args }}
- name: Clippy
run: cargo clippy ${{ matrix.build-args }} -- -D warnings