-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (37 loc) · 1.09 KB
/
cmake-all-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
name: CMake-All-Build
on:
pull_request:
branches:
- main
- develop
- feature/*
- release/*
- hotfix/*
env:
BUILD_TYPE: Debug
WORK_SPACE: ${{github.workspace}}/Project
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive ExternalLibrary/googletest
- name: Install dependencies
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get install libopencv-dev
sudo apt-get install libsfml-dev
sudo apt-get install cmake
sudo apt-get install g++
- name: Configure CMake
run: |
mkdir ${{github.workspace}}/build
cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{env.WORK_SPACE}} -G "Unix Makefiles"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all -j 12