Skip to content

Commit 66a168c

Browse files
committed
Add continuous integration
1 parent c82b3b4 commit 66a168c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CMake
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
BUILD_TYPE: Release
9+
10+
jobs:
11+
build:
12+
name: ${{matrix.name}}
13+
strategy:
14+
matrix:
15+
include:
16+
- os: ubuntu-20.04
17+
name: Linux
18+
cache-key: linux
19+
cmake-args: ''
20+
apt-packages: build-essential
21+
22+
runs-on: ${{matrix.os}}
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Install deps
28+
if: runner.os == 'Linux'
29+
run: |
30+
sudo apt update && sudo apt install ${{matrix.apt-packages}}
31+
32+
- name: Create Build Environment
33+
run: cmake -E make_directory ${{runner.workspace}}/build
34+
35+
- name: Configure CMake
36+
shell: bash
37+
working-directory: ${{runner.workspace}}/build
38+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{matrix.cmake-args}}
39+
40+
- name: Build
41+
working-directory: ${{runner.workspace}}/build
42+
shell: bash
43+
run: |
44+
cmake --build . --config $BUILD_TYPE -j 2

0 commit comments

Comments
 (0)