-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) · 1.15 KB
/
rust.yml
File metadata and controls
53 lines (42 loc) · 1.15 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
53
name: Rust CI
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Build
run: |
cargo build
cargo bench --no-run --profile test
- name: Run tests
run: cargo test --verbose
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
continue-on-error: true
- name: Clippy Check
run: cargo clippy --tests
continue-on-error: true
build-macos:
if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build
run: cargo build