-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.02 KB
/
cmake.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
# source: https://github.com/sindre0830/Workflow-Templates
name: CMake workflow
# when to run the workflow
on:
push:
paths:
- '.github/workflows/cmake.yml'
- 'examples/cpp/**'
pull_request:
workflow_dispatch:
# instructions the workflow will perform
jobs:
build:
# environment to run on
runs-on: ubuntu-latest
# steps to perform
steps:
- uses: actions/checkout@v2
- name: Set up language
working-directory: examples/cpp
run: |
sudo apt-get update
sudo apt-get install gcc g++ cmake
mkdir build
- name: Install dependencies
working-directory: examples/cpp/build
run: cmake ..
- name: Build program
working-directory: examples/cpp/build
run: cmake --build .
- name: Syntax checker
working-directory: examples/cpp
run: |
sudo apt-get install python3-pip
pip3 install cpplint
cpplint --root=. --linelength=150 --filter=-build/include_subdir --recursive --exclude=external/* --exclude=build/* *