Skip to content

Commit 08cccd2

Browse files
authored
Merge pull request #29 from lkpworkspace/dev
v0.9.1
2 parents 0f3884e + 22befb1 commit 08cccd2

15 files changed

+250
-107
lines changed

.github/workflows/macos.yml

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: macOS
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-macos:
7+
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
8+
runs-on: macos-12
9+
permissions:
10+
actions: read
11+
contents: read
12+
security-events: write
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
std: [17, 20]
17+
include:
18+
- generator: Ninja
19+
- build_type: Debug
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Dependencies
25+
run: |
26+
brew install ninja
27+
28+
- name: Cache jsoncpp
29+
id: cache-jsoncpp
30+
uses: actions/cache@v3
31+
with:
32+
path: jsoncpp/
33+
key: ${{runner.os}}-jsoncpp-1.9.5
34+
35+
- name: Download jsoncpp
36+
shell: bash
37+
if: steps.cache-jsoncpp.outputs.cache-hit != 'true'
38+
run: |
39+
wget https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.9.5.tar.gz
40+
tar xvf 1.9.5.tar.gz
41+
42+
- name: Build jsoncpp
43+
if: steps.cache-jsoncpp.outputs.cache-hit != 'true'
44+
run: |
45+
cmake -S jsoncpp-1.9.5 -B build-jsoncpp \
46+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
47+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/jsoncpp \
48+
-DBUILD_OBJECT_LIBS=OFF \
49+
-DJSONCPP_WITH_TESTS=OFF \
50+
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
51+
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF \
52+
-G "${{matrix.generator}}"
53+
cmake --build build-jsoncpp --target install
54+
55+
- name: Cache gflags
56+
id: cache-gflags
57+
uses: actions/cache@v3
58+
with:
59+
path: gflags/
60+
key: ${{runner.os}}-gflags-2.2.2
61+
62+
- name: Download gflags
63+
shell: bash
64+
if: steps.cache-gflags.outputs.cache-hit != 'true'
65+
run: |
66+
wget https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz
67+
tar xvf v2.2.2.tar.gz
68+
69+
- name: Build gflags
70+
if: steps.cache-gflags.outputs.cache-hit != 'true'
71+
run: |
72+
cmake -S gflags-2.2.2 -B build-gflags \
73+
-DBUILD_SHARED_LIBS=ON \
74+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
75+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/gflags \
76+
-G "${{matrix.generator}}"
77+
cmake --build build-gflags --target install
78+
79+
- name: Cache glog
80+
id: cache-glog
81+
uses: actions/cache@v3
82+
with:
83+
path: glog/
84+
key: ${{runner.os}}-glog-0.6.0
85+
86+
- name: Download glog
87+
shell: bash
88+
if: steps.cache-glog.outputs.cache-hit != 'true'
89+
run: |
90+
wget https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz
91+
tar xvf v0.6.0.tar.gz
92+
93+
- name: Build glog
94+
if: steps.cache-glog.outputs.cache-hit != 'true'
95+
run: |
96+
cmake -S glog-0.6.0 -B build-glog \
97+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
98+
-DWITH_PKGCONFIG=OFF \
99+
-DWITH_GTEST=OFF \
100+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/glog \
101+
-DCMAKE_PREFIX_PATH="${{github.workspace}}/gflags" \
102+
-G "${{matrix.generator}}"
103+
cmake --build build-glog --target install
104+
105+
- name: Configure
106+
run: |
107+
cmake -S . -B build_${{matrix.build_type}} \
108+
-DCMAKE_CXX_EXTENSIONS=OFF \
109+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
110+
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
111+
-DMYFRAME_USE_CV=ON \
112+
-DCMAKE_PREFIX_PATH="${{github.workspace}}/jsoncpp;${{github.workspace}}/glog;${{github.workspace}}/gflags" \
113+
-G "${{matrix.generator}}"
114+
115+
- name: Build
116+
run: |
117+
cmake --build build_${{matrix.build_type}} \
118+
--config ${{matrix.build_type}}

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(myframe VERSION 0.9.0)
2+
project(myframe VERSION 0.9.1)
33

44
### option
55
option(MYFRAME_USE_CV "Using conditional variables for thread communication" OFF)

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ worker自驱动,可以通过消息与actor交互;
1616

1717
| 操作系统支持 |
1818
| -------------- |
19-
| Windows |
2019
| Linux |
20+
| Windows |
21+
| macOS |
2122

2223
## 构建
2324
* [github ci linux](.github/workflows/linux.yml)
2425
* [github ci windows](.github/workflows/windows.yml)
26+
* [github ci macOS](.github/workflows/macos.yml)
2527

2628
## 运行所有的example
2729
```sh

0 commit comments

Comments
 (0)