-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (32 loc) · 1017 Bytes
/
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
name: CI
on:
push: { branches: "main" }
pull_request: { branches: "*" }
jobs:
build_and_test:
name: ${{ matrix.os }}, rust-${{ matrix.rust }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, nightly, 1.65.0]
runs-on: ${{ matrix.os }}
steps:
- name: Restore cached crates.io index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-rust-${{ matrix.rust }}
save-always: true
- name: Checkout code
uses: actions/checkout@master
- name: Install Rust ${{ matrix.rust }}
run: |
rustup install ${{ matrix.rust }} --profile minimal
rustup default ${{ matrix.rust }}
- name: Build
run: cargo build --release --all-features --color=always
- name: Test
run: cargo test --release --all-features --color=always