comparison .github/workflows/build.yml @ 33:86113e45f88f

Add Github actions to help manage PRs
author Anthony Nowell <anthony.nowell@windriver.com>
date Tue, 07 Jun 2022 23:22:11 -0700
parents
children d1f0c1cf3c6e
comparison
equal deleted inserted replaced
32:ea5f195f035f 33:86113e45f88f
1 on:
2 pull_request:
3 branches:
4 - master
5 workflow_call:
6
7 name: Build
8
9 jobs:
10 check:
11 name: Check & Lint
12 runs-on: ubuntu-latest
13 steps:
14 - name: Checkout sources
15 uses: actions/checkout@v2
16
17 - name: Install PAM dev files
18 run: sudo apt-get install -y libpam0g-dev
19
20 - name: Use cargo cache
21 uses: actions/cache@v2
22 with:
23 path: |
24 ~/.cargo/bin/
25 ~/.cargo/registry/index/
26 ~/.cargo/registry/cache/
27 ~/.cargo/git/db/
28 target/
29 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30
31 - name: Install stable toolchain
32 uses: actions-rs/toolchain@v1
33 with:
34 profile: minimal
35 toolchain: stable
36 override: true
37
38 - name: Run cargo check
39 uses: actions-rs/cargo@v1
40 with:
41 command: check
42 args: --manifest-path pam/Cargo.toml
43
44 - name: Run cargo test
45 uses: actions-rs/cargo@v1
46 with:
47 command: test
48 args: --manifest-path pam/Cargo.toml
49
50 - name: Run cargo check on pam-http
51 uses: actions-rs/cargo@v1
52 with:
53 command: check
54 args: --manifest-path pam-http/Cargo.toml
55
56 - name: Run cargo check on pam-sober
57 uses: actions-rs/cargo@v1
58 with:
59 command: check
60 args: --manifest-path pam-sober/Cargo.toml
61
62 - name: Run cargo fmt
63 uses: actions-rs/cargo@v1
64 with:
65 command: fmt
66 args: --manifest-path pam/Cargo.toml --all --check
67
68 - name: Run cargo clippy
69 uses: actions-rs/cargo@v1
70 with:
71 command: clippy
72 args: --manifest-path pam/Cargo.toml -- -D warnings
73
74