-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 1.88 KB
/
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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Rust
on: [ push, pull_request ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Ensure Rust code is formatted
run: |
cd Rust/jobspls
cargo fmt --all --check
clippy:
name: Run clippy for lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Check Rust code with clippy
run: |
cd Rust/jobspls
cargo clippy --all-features --verbose
test:
name: Run Rust tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run Rust tests
run: |
cd Rust/jobspls
cargo test --all-features --all
coverage:
name: Code coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
- name: Run Rust code coverage
continue-on-error: true
run: |
cd Rust/jobspls
cargo tarpaulin --all-features --workspace --verbose
build-linux:
name: Build project (Linux x64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: rui314/setup-mold@v1
- name: Build
run: |
cd Rust/jobspls
cargo build --all --release
build-macOS:
name: Build project (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: |
cd Rust/jobspls
cargo build --all --release