Skip to content

Commit 7e20596

Browse files
committed
Create a Github action
1 parent 436dc4d commit 7e20596

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build And Test
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Get Conan
20+
uses: turtlebrowser/[email protected]
21+
22+
- name: Configure CMake
23+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
24+
25+
- name: Build
26+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
27+
28+
- name: Test
29+
working-directory: ${{github.workspace}}/build
30+
run: ctest -C ${{env.BUILD_TYPE}}
31+

rest/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ if(WIN32)
1010
target_compile_definitions(rest PRIVATE _WIN32_WINNT=0x0601)
1111
endif()
1212

13+
set(THREADS_PREFER_PTHREAD_FLAG ON)
14+
find_package(Threads REQUIRED)
15+
target_link_libraries(rest PRIVATE Threads::Threads)
16+
1317
target_link_libraries(rest PUBLIC controller)

0 commit comments

Comments
 (0)