Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: CI
2
3 on:
4 pull_request:
5 push:
6 branches:
7 - master
8
9 env:
10 RUST_BACKTRACE: 1
11 RUSTFLAGS: -Dwarnings
12
13
14 jobs:
15 build_and_test_nix:
16 name: Build and test (Nix)
17 runs-on: ${{ matrix.os }}
18 strategy:
19 matrix:
20 os: [ubuntu-latest, macOS-latest]
21 rust: [nightly, beta, stable]
22
23 steps:
24 - name: Checkout
25 uses: actions/checkout@master
26 with:
27 submodules: recursive
28
29 - name: Install ${{ matrix.rust }}
30 uses: actions-rs/toolchain@v1
31 with:
32 toolchain: ${{ matrix.rust }}
33 override: true
34
35 - name: check
36 uses: actions-rs/cargo@v1
37 with:
38 command: check
39 args: --all --bins --tests
40
41 - name: check bench
42 uses: actions-rs/cargo@v1
43 if: matrix.rust == 'nightly'
44 with:
45 command: check
46 args: --benches
47
48 - name: check no default features
49 uses: actions-rs/cargo@v1
50 with:
51 command: check
52 args: --no-default-features
53
54 - name: tests
55 uses: actions-rs/cargo@v1
56 with:
57 command: test
58 args: --all
59
60 - name: no default features
61 uses: actions-rs/cargo@v1
62 with:
63 command: test
64 args: --all --no-default-features
65
66 build_and_test_windows:
67 name: Build and test (Windows)
68 runs-on: ${{ matrix.os }}
69 strategy:
70 matrix:
71 os: [windows-latest]
72 rust: [nightly, beta, stable]
73 target:
74 - x86_64-pc-windows-gnu
75 - x86_64-pc-windows-msvc
76
77 steps:
78 - name: Checkout
79 uses: actions/checkout@master
80 with:
81 submodules: recursive
82
83 - name: Install ${{ matrix.rust }}
84 uses: actions-rs/toolchain@v1
85 with:
86 toolchain: ${{ matrix.rust }}
87 target: ${{ matrix.target }}
88 override: true
89
90 - uses: msys2/setup-msys2@v2
91 - name: check
92 uses: actions-rs/cargo@v1
93 with:
94 command: check
95 args: --all --bins --tests --target ${{ matrix.target }}
96
97 - name: check no default features
98 uses: actions-rs/cargo@v1
99 with:
100 command: check
101 override: true
102 args: --no-default-features
103
104 - name: check bench
105 uses: actions-rs/cargo@v1
106 if: matrix.rust == 'nightly'
107 with:
108 command: check
109 target: ${{ matrix.target }}
110 args: --benches
111
112 - name: tests
113 uses: actions-rs/cargo@v1
114 with:
115 command: test
116 args: --all --target ${{ matrix.target }}
117
118 check_fmt_and_docs:
119 name: Checking fmt and docs
120 runs-on: ubuntu-latest
121 steps:
122 - uses: actions/checkout@master
123
124 - uses: actions-rs/toolchain@v1
125 with:
126 profile: minimal
127 toolchain: nightly
128 override: true
129 components: rustfmt
130
131 - name: setup
132 run: |
133 rustup component add rustfmt
134 rustc --version
135
136 - name: fmt
137 run: cargo fmt --all -- --check
138
139 - name: Docs
140 run: cargo doc
141
142 clippy_check:
143 runs-on: ubuntu-latest
144 steps:
145 - uses: actions/checkout@master
146 - uses: actions-rs/toolchain@v1
147 with:
148 profile: minimal
149 toolchain: nightly
150 override: true
151 components: clippy
152 - uses: actions-rs/clippy-check@v1
153 with:
154 token: ${{ secrets.GITHUB_TOKEN }}
155 args: --all-features --all-targets