-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (43 loc) · 1.12 KB
/
pr.yml
File metadata and controls
55 lines (43 loc) · 1.12 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
name: Pull Request
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [opened, synchronize, reopened]
jobs:
# Style checks
style:
runs-on: ubuntu-latest
steps:
- run: sudo apt install clang-format-7
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
# Build/run unit tests with cmake
cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install cmake
run: sudo apt-get install make cmake
- name: Run Unit Tests
run: mkdir build && cd build && cmake .. -DBUILD_TESTS=true && make && ctest
# Build/run unit tests with bazel
bazel:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup bazel
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: '2.0.0'
- name: Setup bazel cache
uses: actions/cache@v2
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Run Unit Tests
run: bazel test //test/...