Skip to content

Commit b559809

Browse files
committed
Update cmake files with cmake-init v0.40.5
Add requirements.txt for pip Add ignore-workd-list for codespell Add CI cmake based project workflow
1 parent e4e3e42 commit b559809

17 files changed

+704
-114
lines changed

.github/workflows/cmake.yml

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- feature/*
9+
10+
pull_request:
11+
branches:
12+
- develop
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-22.04
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-python@v5
22+
with: {python-version: "3.8"}
23+
24+
- name: Install codespell
25+
run: pip3 install codespell
26+
27+
- name: Lint
28+
if: always()
29+
working-directory: asio
30+
run: cmake -D FORMAT_COMMAND=clang-format-14 -P cmake/lint.cmake || echo ignored
31+
32+
- name: Spell check
33+
if: always()
34+
working-directory: asio
35+
run: cmake -P cmake/spell.cmake || echo ignored
36+
37+
coverage:
38+
needs: [lint]
39+
40+
runs-on: ubuntu-22.04
41+
42+
# To enable coverage, delete the last line from the conditional below and
43+
# edit the "<name>" placeholder to your GitHub name.
44+
# If you do not wish to use codecov, then simply delete this job from the
45+
# workflow.
46+
if: github.repository_owner == '<name>'
47+
&& false
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Install LCov
53+
run: sudo apt-get update -q
54+
&& sudo apt-get install lcov -q -y
55+
56+
- name: Configure
57+
working-directory: asio
58+
run: cmake --preset=ci-coverage
59+
60+
- name: Build
61+
working-directory: asio
62+
run: cmake --build build/coverage -j 2
63+
64+
- name: Test
65+
working-directory: asio/build/coverage
66+
run: ctest --output-on-failure --no-tests=error -j 2
67+
68+
- name: Process coverage info
69+
working-directory: asio
70+
run: cmake --build build/coverage -t coverage
71+
72+
- name: Submit to codecov.io
73+
uses: codecov/codecov-action@v3
74+
with:
75+
file: build/coverage/coverage.info
76+
77+
sanitize:
78+
needs: [lint]
79+
80+
runs-on: ubuntu-22.04
81+
82+
env: {CXX: clang++-14}
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
87+
- name: Configure
88+
working-directory: asio
89+
run: cmake --preset=ci-sanitize
90+
91+
- name: Build
92+
working-directory: asio
93+
run: cmake --build build/sanitize -j 2
94+
95+
- name: Test
96+
working-directory: asio/build/sanitize
97+
env:
98+
ASAN_OPTIONS: "strict_string_checks=1:\
99+
detect_stack_use_after_return=1:\
100+
check_initialization_order=1:\
101+
strict_init_order=1:\
102+
detect_leaks=1"
103+
UBSAN_OPTIONS: print_stacktrace=1
104+
run: ctest --output-on-failure --no-tests=error -j 2
105+
106+
test:
107+
needs: [lint]
108+
109+
strategy:
110+
matrix:
111+
os: [macos-12, ubuntu-22.04, windows-2022]
112+
113+
runs-on: ${{ matrix.os }}
114+
115+
steps:
116+
- uses: actions/checkout@v4
117+
118+
- name: Install static analyzers
119+
if: matrix.os == 'ubuntu-22.04'
120+
run: >-
121+
sudo apt-get install clang-tidy-14 cppcheck -y -q
122+
123+
sudo update-alternatives --install
124+
/usr/bin/clang-tidy clang-tidy
125+
/usr/bin/clang-tidy-14 140
126+
127+
- name: Setup MultiToolTask
128+
if: matrix.os == 'windows-2022'
129+
run: |
130+
Add-Content "$env:GITHUB_ENV" 'UseMultiToolTask=true'
131+
Add-Content "$env:GITHUB_ENV" 'EnforceProcessCountAcrossBuilds=true'
132+
133+
- name: Configure
134+
shell: pwsh
135+
working-directory: asio
136+
run: cmake "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
137+
138+
- name: Build
139+
working-directory: asio
140+
run: cmake --build build --config Release -j 2
141+
142+
- name: Install
143+
working-directory: asio
144+
run: cmake --install build --config Release --prefix prefix
145+
146+
- name: Test
147+
working-directory: asio/build
148+
run: ctest --output-on-failure --no-tests=error -C Release -j 2
149+
150+
docs:
151+
# Deploy docs only when builds succeed
152+
needs: [sanitize, test]
153+
154+
runs-on: ubuntu-22.04
155+
156+
# To enable, first you have to create an orphaned gh-pages branch:
157+
#
158+
# git switch --orphan gh-pages
159+
# git commit --allow-empty -m "Initial commit"
160+
# git push -u origin gh-pages
161+
#
162+
# Edit the <name> placeholder below to your GitHub name, so this action
163+
# runs only in your repository and no one else's fork. After these, delete
164+
# this comment and the last line in the conditional below.
165+
# If you do not wish to use GitHub Pages for deploying documentation, then
166+
# simply delete this job similarly to the coverage one.
167+
if: github.ref == 'refs/heads/master'
168+
&& github.event_name == 'push'
169+
&& github.repository_owner == '<name>'
170+
&& false
171+
172+
steps:
173+
- uses: actions/checkout@v4
174+
175+
- uses: actions/setup-python@v5
176+
with: {python-version: "3.8"}
177+
178+
- name: Install m.css dependencies
179+
run: pip3 install jinja2 Pygments
180+
181+
- name: Install Doxygen
182+
run: sudo apt-get update -q
183+
&& sudo apt-get install doxygen -q -y
184+
185+
- name: Build docs
186+
working-directory: asio
187+
run: cmake "-DPROJECT_SOURCE_DIR=$PWD" "-DPROJECT_BINARY_DIR=$PWD/build"
188+
-P cmake/docs-ci.cmake
189+
190+
- name: Deploy docs
191+
uses: peaceiris/actions-gh-pages@v3
192+
with:
193+
github_token: ${{ secrets.GITHUB_TOKEN }}
194+
publish_dir: build/docs/html

asio/.TODO.txt

Lines changed: 84 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,91 @@
1-
Claus-iMac:dev clausklein$ make spell-check | grep -v encode | grep -vw alives
2-
CMake Error at cmake/spell.cmake:27 (message):
3-
Run again with FIX=YES to fix these errors.
4-
5-
6-
make[3]: *** [CMakeFiles/spell-check] Error 1
7-
make[2]: *** [CMakeFiles/spell-check.dir/all] Error 2
8-
make[1]: *** [CMakeFiles/spell-check.dir/rule] Error 2
9-
make: *** [spell-check] Error 2
10-
[100%] Checking spelling
11-
./include/asio/io_context.hpp:185: exeution ==> execution
12-
./include/asio/io_context.hpp:318: reponsibility ==> responsibility
13-
./include/asio/io_context.hpp:349: reponsibility ==> responsibility
14-
./include/asio/io_context.hpp:401: reponsibility ==> responsibility
15-
./include/asio/io_context.hpp:423: reponsibility ==> responsibility
1+
ninja -C build/dev spell-check
2+
ninja: Entering directory `build/dev'
3+
[1/1] Checking spelling
4+
FAILED: CMakeFiles/spell-check /home/klein_cl/Workspace/cpp/asio/asio/build/dev/CMakeFiles/spell-check
5+
cd /home/klein_cl/Workspace/cpp/asio/asio && /home/klein_cl/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -D SPELL_COMMAND=codespell -P /home/klein_cl/Workspace/cpp/asio/asio/cmake/spell.cmake
6+
Used config files:
7+
1: .codespellrc
8+
./src/examples/cpp14/operations/composed_7.cpp:73: asychronous ==> asynchronous
9+
./src/examples/cpp14/operations/composed_7.cpp:119: asychronous ==> asynchronous
10+
./src/examples/cpp14/operations/composed_6.cpp:111: asychronous ==> asynchronous
11+
./src/examples/cpp11/timers/time_t_timer.cpp:66: absoluate ==> absolute
12+
./src/examples/cpp11/porthopper/client.cpp:96: renegotation ==> renegotiation
13+
./src/examples/cpp11/porthopper/client.cpp:120: renegotation ==> renegotiation
14+
./src/examples/cpp11/porthopper/client.cpp:149: renegotation ==> renegotiation
15+
./src/examples/cpp11/porthopper/client.cpp:162: renegotation ==> renegotiation
16+
./src/examples/cpp11/operations/composed_7.cpp:60: asychronous ==> asynchronous
17+
./src/examples/cpp11/operations/composed_6.cpp:93: asychronous ==> asynchronous
18+
./src/examples/cpp20/operations/composed_7.cpp:74: asychronous ==> asynchronous
19+
./src/examples/cpp20/operations/composed_7.cpp:120: asychronous ==> asynchronous
20+
./src/examples/cpp20/operations/composed_6.cpp:116: asychronous ==> asynchronous
21+
./src/doc/reference.qbk:1697: requre ==> require
22+
./src/doc/reference.qbk:3966: requre ==> require
23+
./src/doc/reference.qbk:17885: ore ==> or
24+
./src/doc/reference.qbk:17947: ore ==> or
25+
./src/doc/reference.qbk:32144: ore ==> or
26+
./src/doc/reference.qbk:32206: ore ==> or
27+
./src/doc/reference.qbk:89453: requre ==> require
28+
./src/doc/reference.qbk:110672: reponsibility ==> responsibility
29+
./src/doc/reference.qbk:110715: reponsibility ==> responsibility
30+
./src/doc/reference.qbk:110799: reponsibility ==> responsibility
31+
./src/doc/reference.qbk:110833: reponsibility ==> responsibility
32+
./src/doc/reference.qbk:164642: retuned ==> returned
33+
./src/doc/history.qbk:41: potental ==> potential
34+
./src/doc/history.qbk:165: immmediate ==> immediate
35+
./src/doc/history.qbk:863: occured ==> occurred
36+
./src/doc/history.qbk:1710: compatiblity ==> compatibility
37+
./src/doc/history.qbk:1827: Lightening ==> Lightning, Lighting
38+
./src/doc/history.qbk:1903: copyable ==> copiable
39+
./src/doc/history.qbk:1946: discconected ==> disconnected
40+
./src/doc/history.qbk:2108: compatability ==> compatibility
41+
./src/doc/history.qbk:2533: copyable ==> copiable
42+
./src/doc/history.qbk:2568: accomodate ==> accommodate
43+
./src/doc/history.qbk:2788: tranferred ==> transferred
44+
./src/doc/history.qbk:2907: re-use ==> reuse
45+
./src/doc/quickref.xml:17: thead ==> thread
46+
./src/doc/quickref.xml:26: thead ==> thread
47+
./src/doc/quickref.xml:133: thead ==> thread
48+
./src/doc/quickref.xml:139: thead ==> thread
49+
./src/doc/quickref.xml:320: thead ==> thread
50+
./src/doc/quickref.xml:326: thead ==> thread
51+
./src/doc/quickref.xml:427: thead ==> thread
52+
./src/doc/quickref.xml:433: thead ==> thread
53+
./src/doc/quickref.xml:577: thead ==> thread
54+
./src/doc/quickref.xml:592: thead ==> thread
55+
./src/doc/quickref.xml:693: thead ==> thread
56+
./src/doc/quickref.xml:705: thead ==> thread
57+
./src/doc/using.qbk:232: Explictly ==> Explicitly
58+
./src/doc/requirements/asynchronous_operations.qbk:332: asynchonous ==> asynchronous
59+
./src/doc/overview/immediate_completion.qbk:16: immmediate ==> immediate
60+
./src/doc/overview/cpp20_coroutines.qbk:223: Asynchonous ==> Asynchronous
61+
./src/doc/overview/coro.qbk:15: transfomers ==> transformers
62+
./src/doc/overview/coro.qbk:136: dermined ==> determined
63+
./src/doc/overview/coro.qbk:137: follwing ==> following
64+
./src/doc/overview/coro.qbk:194: direclty ==> directly
65+
./src/doc/overview/implementation.qbk:63: asynchonous ==> asynchronous
66+
./cmake/install-rules.cmake:19: requierd ==> required
67+
./include/asio/io_context.hpp:300: reponsibility ==> responsibility
68+
./include/asio/io_context.hpp:331: reponsibility ==> responsibility
69+
./include/asio/io_context.hpp:381: reponsibility ==> responsibility
70+
./include/asio/io_context.hpp:403: reponsibility ==> responsibility
71+
./include/asio/basic_datagram_socket.hpp:348: ore ==> or
72+
./include/asio/basic_datagram_socket.hpp:380: ore ==> or
1673
./include/asio/use_future.hpp:102: retuned ==> returned
17-
./include/asio/impl/use_future.hpp:203: exeption ==> exception, exemption
18-
./include/asio/experimental/deferred.hpp:375: alue ==> value
19-
./include/asio/experimental/impl/parallel_group.hpp:80: operatations ==> operations
20-
./include/asio/detail/executor_function.hpp:124: copyable ==> copiable
21-
./include/asio/detail/executor_function.hpp:171: copyable ==> copiable
74+
./include/asio/basic_raw_socket.hpp:342: ore ==> or
75+
./include/asio/basic_raw_socket.hpp:373: ore ==> or
76+
./include/asio/detail/timer_queue_ptime.hpp:32: instantation ==> instantiation
77+
./include/asio/detail/executor_function.hpp:119: copyable ==> copiable
2278
./include/asio/detail/service_registry.hpp:79: Initalise ==> Initialise
2379
./include/asio/detail/service_registry.hpp:84: Initalise ==> Initialise
2480
./include/asio/detail/win_iocp_io_context.hpp:267: resouce ==> resource
25-
./include/asio/detail/timer_queue_ptime.hpp:32: instantation ==> instantiation
26-
./include/asio/execution/any_executor.hpp:98: requre ==> require
81+
./include/asio/execution/any_executor.hpp:112: requre ==> require
2782
./include/asio/execution/impl/bad_executor.ipp:2: exection ==> execution
28-
./include/asio/execution/impl/receiver_invocation_error.ipp:2: exection ==> execution
83+
./include/asio/experimental/impl/parallel_group.hpp:81: operatations ==> operations
84+
./include/asio/experimental/impl/parallel_group.hpp:396: operatations ==> operations
2985
./include/asio/ip/detail/endpoint.hpp:31: implementating ==> implementing
30-
./src/examples/cpp11/timers/time_t_timer.cpp:66: absoluate ==> absolute
31-
./src/examples/cpp11/operations/composed_6.cpp:92: asychronous ==> asynchronous
32-
./src/examples/cpp11/operations/composed_7.cpp:59: asychronous ==> asynchronous
33-
./src/examples/cpp03/timers/time_t_timer.cpp:65: absoluate ==> absolute
34-
./src/examples/cpp03/porthopper/client.cpp:100: renegotation ==> renegotiation
35-
./src/examples/cpp03/porthopper/client.cpp:125: renegotation ==> renegotiation
36-
./src/examples/cpp03/porthopper/client.cpp:153: renegotation ==> renegotiation
37-
./src/examples/cpp03/porthopper/client.cpp:166: renegotation ==> renegotiation
38-
./src/examples/cpp14/operations/composed_6.cpp:103: asychronous ==> asynchronous
39-
./src/examples/cpp14/operations/composed_7.cpp:65: asychronous ==> asynchronous
40-
./src/examples/cpp14/operations/composed_7.cpp:111: asychronous ==> asynchronous
41-
./src/doc/using.qbk:227: Explictly ==> Explicitly
42-
./src/doc/history.qbk:137: occured ==> occurred
43-
./src/doc/history.qbk:984: compatiblity ==> compatibility
44-
./src/doc/history.qbk:1101: Lightening ==> Lightning, lighting
45-
./src/doc/history.qbk:1177: copyable ==> copiable
46-
./src/doc/history.qbk:1220: discconected ==> disconnected
47-
./src/doc/history.qbk:1382: compatability ==> compatibility
48-
./src/doc/history.qbk:1807: copyable ==> copiable
49-
./src/doc/history.qbk:1842: accomodate ==> accommodate
50-
./src/doc/history.qbk:2062: tranferred ==> transferred
51-
./src/doc/reference.qbk:1646: requre ==> require
52-
./src/doc/reference.qbk:83101: requre ==> require
53-
./src/doc/reference.qbk:96234: alue ==> value
54-
./src/doc/reference.qbk:96274: alue ==> value
55-
./src/doc/reference.qbk:103899: exeution ==> execution
56-
./src/doc/reference.qbk:104790: reponsibility ==> responsibility
57-
./src/doc/reference.qbk:104833: reponsibility ==> responsibility
58-
./src/doc/reference.qbk:104917: reponsibility ==> responsibility
59-
./src/doc/reference.qbk:104948: reponsibility ==> responsibility
60-
./src/doc/reference.qbk:107562: exeution ==> execution
61-
./src/doc/reference.qbk:157316: retuned ==> returned
62-
./src/doc/quickref.xml:17: thead ==> thread
63-
./src/doc/quickref.xml:26: thead ==> thread
64-
./src/doc/quickref.xml:180: thead ==> thread
65-
./src/doc/quickref.xml:186: thead ==> thread
66-
./src/doc/quickref.xml:356: thead ==> thread
67-
./src/doc/quickref.xml:362: thead ==> thread
68-
./src/doc/quickref.xml:463: thead ==> thread
69-
./src/doc/quickref.xml:469: thead ==> thread
70-
./src/doc/quickref.xml:613: thead ==> thread
71-
./src/doc/quickref.xml:628: thead ==> thread
72-
./src/doc/quickref.xml:729: thead ==> thread
73-
./src/doc/quickref.xml:741: thead ==> thread
74-
./src/doc/requirements/asynchronous_operations.qbk:309: asynchonous ==> asynchronous
75-
./src/doc/overview/coro.qbk:137: follwing ==> following
76-
./src/doc/overview/coro.qbk:194: direclty ==> directly
77-
Claus-iMac:dev clausklein$
86+
./include/asio/impl/use_future.hpp:104: exeption ==> exception, exemption
87+
CMake Error at cmake/spell.cmake:27 (message):
88+
Run again with FIX=YES to fix these errors.
89+
7890

91+
ninja: build stopped: subcommand failed.

asio/.codespellrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
builtin = clear,rare,names,informal,code
33
check-filenames =
44
check-hidden =
5-
skip = */.git,*/build,*/prefix,*/stage
5+
skip = */.git,*/build,*/prefix,*/stage,.TODO.txt
66
quiet-level = 2
7+
ignore-words-list = tim,deque,endcode,keep-alives,nmake

0 commit comments

Comments
 (0)