-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (42 loc) · 1.32 KB
/
ci.yml
File metadata and controls
52 lines (42 loc) · 1.32 KB
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
# This is a wrapper around ci/runtests.sh
# ci/runtests.sh is intended to be usable locally without github.
name: ci
on:
pull_request:
push:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
ci:
strategy:
matrix:
# nvme-mi-dev uses edition 2024, stablised in 1.85
rust_version: [stable, 1.85, nightly]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install usbredir build dependencies
run: >
sudo apt-get update &&
sudo apt-get install libusbredirparser-dev
- name: Cache Rust files
uses: actions/cache@v4
with:
path: |
~/.cargo/
target/ci/
# Save a unique cache each time
# (https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache)
key: rust-${{ matrix.rust_version }}-${{ github.run_id }}
# Load from the most recent match
restore-keys: |
rust-${{ matrix.rust_version }}
- name: Rustup ${{ matrix.rust_version }}
run: |
rustup override set ${{ matrix.rust_version }}
- name: Install rustfmt & clippy components
run: |
rustup component add rustfmt clippy
- name: Build and test ${{ matrix.rust_version }}
run: ./ci/runtests.sh