-
Notifications
You must be signed in to change notification settings - Fork 222
94 lines (76 loc) · 1.99 KB
/
main.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
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on:
push:
branches: [master]
pull_request:
merge_group:
types: [checks_requested]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
version: [stable, beta, nightly]
steps:
- uses: actions/checkout@v3
- name: Set toolchain
run: |
rustup set profile minimal
rustup override set ${{ matrix.version }}
- name: Init submodules
run: git submodule update --init
- name: Cargo bench
if: matrix.version != '1.41.0'
run: cargo bench --all
env:
RUSTFLAGS: --cfg bench
- name: Test "rustc-test/capture" feature
if: matrix.version == 'nightly'
working-directory: rcdom
run: cargo test --features "rustc-test/capture"
- name: Cargo test
if: matrix.version != 'nightly'
run: cargo test --all
- name: Cargo doc
if: matrix.version == 'nightly'
run: cargo doc
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
run: |
rustup set profile minimal
rustup override set 1.60.0
- run: cargo check --lib --all-features
build_result:
name: Result
runs-on: ubuntu-latest
needs:
- "ci"
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: ${{ !success() }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
run: |
rustup set profile minimal
rustup override set stable
- name: Install clippy
run: |
rustup component add clippy
rustup component add rustfmt
- name: Format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings