-
Notifications
You must be signed in to change notification settings - Fork 28
99 lines (88 loc) · 2.39 KB
/
ci.yml
File metadata and controls
99 lines (88 loc) · 2.39 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: rustfmt check
run: cargo fmt --all -- --check
macos-latest-stable:
needs: [format]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo test
run: cargo test
macos-latest-nightly:
needs: [format]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: cargo test
run: cargo test
windows-latest-stable:
needs: [format]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo test
run: cargo test
windows-latest-nightly:
needs: [format]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: cargo test
run: cargo test
coveralls-coverage-report:
needs: [format]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: install llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: cargo llvm-cov
run: cargo llvm-cov --all-features --lcov --output-path lcov.info --no-cfg-coverage --no-cfg-coverage-nightly
- name: coveralls upload
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
clippy:
needs: [format]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings
ubuntu-latest-nightly:
needs: [format]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: cargo test
run: cargo test