Skip to content

Commit 455c19c

Browse files
committed
Add workflow files
1 parent 53781f7 commit 455c19c

File tree

4 files changed

+87
-1
lines changed

4 files changed

+87
-1
lines changed

.github/workflows/cmake_clang.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Clang
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Trigger on push
7+
pull_request:
8+
branches:
9+
- master # Trigger on pull
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest # Use Ubuntu environment for the build
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2 # Checkout the repository code
18+
19+
- name: Configure CMake with Clang
20+
run: cmake -S . -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ # Configure CMake with Clang as the compiler
21+
22+
- name: Build
23+
run: cmake --build build # Build the project using CMake
24+
25+
- name: Run StdWorkerThreadApp
26+
run: ./build/StdWorkerThreadApp # Run the built executable

.github/workflows/cmake_ubuntu.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Ubuntu
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Trigger on push
7+
pull_request:
8+
branches:
9+
- master # Trigger on pull
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest # Use Ubuntu environment for the build
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2 # Checkout the repository code
18+
19+
- name: Configure CMake
20+
run: cmake -S . -B build # Configure CMake to generate build files in 'build' directory
21+
22+
- name: Build
23+
run: cmake --build build # Build the project using CMake
24+
25+
- name: Run StdWorkerThreadApp
26+
run: ./build/StdWorkerThreadApp # Run the built executable

.github/workflows/cmake_windows.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Trigger on push
7+
pull_request:
8+
branches:
9+
- master # Trigger on pull
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest # Use Windows environment for the build
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2 # Checkout the repository code
18+
19+
- name: Set up Visual Studio
20+
uses: microsoft/setup-msbuild@v1.1 # Set up Visual Studio environment (MSBuild)
21+
22+
- name: Configure CMake
23+
run: cmake -S . -B build -G "Visual Studio 17 2022" # Configure CMake for Visual Studio
24+
25+
- name: Build
26+
run: cmake --build build --config Release # Build the project using CMake with Release configuration
27+
28+
- name: Run StdWorkerThreadApp
29+
run: .\build\Release\DeleStdWorkerThreadApp.exe # Run the built executable (adjust path for MSBuild)

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
![License MIT](https://img.shields.io/github/license/BehaviorTree/BehaviorTree.CPP?color=blue)
2+
[![conan Ubuntu](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_ubuntu.yml/badge.svg)](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_ubuntu.yml)
3+
[![conan Ubuntu](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_clang.yml/badge.svg)](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_clang.yml)
4+
[![conan Windows](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_windows.yml/badge.svg)](https://github.com/endurodave/StdWorkerThread/actions/workflows/cmake_windows.yml)
5+
16
# C++ std::thread Event Loop with Message Queue and Timer
7+
28
Create a worker thread with an event loop, message queue and a timer using the C++11 thread support library.
39

410
# Table of Contents
@@ -16,7 +22,6 @@ Create a worker thread with an event loop, message queue and a timer using the C
1622
- [Star History](#star-history)
1723
- [Conclusion](#conclusion)
1824

19-
2025
# Preface
2126

2227
Originally published on CodeProject at: <a href="http://www.codeproject.com/Articles/1169105/Cplusplus-std-thread-Event-Loop-with-Message-Queue"><strong>C++ std::thread Event Loop with Message Queue and Timer</strong></a>

0 commit comments

Comments
 (0)