-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.14 KB
/
Copy pathci.yml
File metadata and controls
44 lines (44 loc) · 1.14 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
name: ci
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
build:
strategy:
matrix:
rust-version: ["1.91.1"]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
rust-version: stable
name: ${{ matrix.os }} - ${{ matrix.rust-version }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install (Rust)
run: |
rustup toolchain install ${{ matrix.rust-version }} --profile default --no-self-update
rustup default ${{ matrix.rust-version }}
cargo --version
- name: Cache (Rust)
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Lint
if: matrix.rust-version != 'stable'
run: |
echo ::group::rustfmt
cargo fmt --check
echo ::endgroup::
echo ::group::clippy
cargo clippy --locked -- -Dwarnings
echo ::endgroup::
- name: Test
env:
RUSTFLAGS: "-Dwarnings"
run: |
cargo test --locked