-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (49 loc) · 1.46 KB
/
ci.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
58
59
60
61
62
63
name: Build & Tests
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_test_run:
name: Build and test on ${{ matrix.job.os }} (${{ matrix.job.target }})
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
# - { target: aarch64-unknown-linux-gnu , os: ubuntu-22.04 }
# - { target: x86_64-unknown-linux-gnu , os: ubuntu-22.04 }
# - { target: x86_64-apple-darwin , os: macos-12 }
- { target: x86_64-pc-windows-msvc , os: windows-2022 }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}
- name: Use cached dependencies
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.job.os }}-${{ matrix.job.target }}"
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
lint:
name: Lint
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use cached dependencies
uses: Swatinem/rust-cache@v2
- name: Install clippy and rustfmt
run: |
rustup component add clippy
rustup component add rustfmt
- name: Run clippy
run: cargo clippy --all-features -- -Dwarnings
- name: Run fmt
run: cargo fmt --check