-
Notifications
You must be signed in to change notification settings - Fork 20
57 lines (47 loc) · 1.4 KB
/
build.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
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- '.github/workflows/build.yml'
env:
CARGO_TERM_COLOR: always
jobs:
detect-directory-changes:
name: "Detect Directory Changes"
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.detect.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Detect Directory Changes
id: detect
uses: tchupp/actions-detect-directory-changes@v1
with:
included-paths: "tinkernet,invarch"
build:
runs-on: ubuntu-latest
strategy:
matrix:
project: ${{ fromJSON(needs.detect-directory-changes.outputs.changed) }}
steps:
- uses: actions/checkout@v2
- name: Setup for checks
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Build [${{ matrix.project }}]
working-directory: ./${{ matrix.project }}
run: cargo build --verbose
- name: Run tests [${{ matrix.project }}]
working-directory: ./${{ matrix.project }}
run: cargo test --verbose
- name: Run clippy [${{ matrix.project }}]
working-directory: ./${{ matrix.project }}
run: cargo clippy -- -D warnings
- name: Run cargofmt [${{ matrix.project }}]
working-directory: ./${{ matrix.project }}
run: cargo +stable fmt --all -- --check