Skip to content

Commit 615608b

Browse files
authored
Merge pull request #243 from tetengo/v1.6.1-ubuntu_upgrade
V1.6.1 ubuntu upgrade
2 parents bb572e4 + 2bf6e19 commit 615608b

32 files changed

+109
-64
lines changed

.github/workflows/linux-clang.yml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@ on:
1313
branches: [ master ]
1414

1515
env:
16-
CONCURRENT_BUILD: 4
17-
CLANG_COMMAND: clang-11
18-
CLANGXX_COMMAND: clang++-11
19-
DOXYGEN_VER: 1.9.3
20-
DOXYGEN_CACHE_REV: 0
21-
BOOST_VER: 1_79_0
22-
BOOST_VER_DOT: 1.79.0
23-
BOOST_TOOLSET: clang
24-
BOOST_CACHE_REV: 0
16+
CONCURRENT_BUILD: 4
17+
CLANG_COMMAND: clang-14
18+
CLANGXX_COMMAND: clang++-14
19+
DOXYGEN_VER: 1.9.3
20+
DOXYGEN_CACHE_REV: 0
21+
BOOST_VER: 1_79_0
22+
BOOST_VER_DOT: 1.79.0
23+
BOOST_BOOTSTRAP_TOOLSET: clang
24+
BOOST_TOOLSET: clang-14
25+
BOOST_CACHE_REV: 12
2526

2627
jobs:
2728
doxygen_build:
2829
name: Doxygen Build
29-
runs-on: ubuntu-20.04
30+
runs-on: ubuntu-22.04
3031
steps:
3132
- name: Install dependencies
3233
shell: bash
@@ -64,8 +65,15 @@ jobs:
6465
6566
boost_build:
6667
name: Boost Build
67-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-22.04
6869
steps:
70+
- name: Install dependencies
71+
shell: bash
72+
run: |
73+
sudo apt-get -y update
74+
sudo apt-get -y install \
75+
clang-14
76+
6977
- name: Cache Boost build
7078
uses: actions/cache@v2
7179
with:
@@ -82,14 +90,14 @@ jobs:
8290
curl -L -o boost_${{ env.BOOST_VER }}.tar.bz2 https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_VER_DOT }}/source/boost_${{ env.BOOST_VER }}.tar.bz2
8391
tar -xf boost_${{ env.BOOST_VER }}.tar.bz2
8492
cd boost_${{ env.BOOST_VER }}
85-
./bootstrap.sh --with-toolset=${{ env.BOOST_TOOLSET }}
93+
./bootstrap.sh --with-toolset=${{ env.BOOST_BOOTSTRAP_TOOLSET }}
8694
(./b2 -j ${{ env.CONCURRENT_BUILD }} toolset=${{ env.BOOST_TOOLSET }} variant=release link=static || :)
8795
touch .build_finished
8896
fi
8997
9098
doxygen:
9199
name: Doxygen
92-
runs-on: ubuntu-20.04
100+
runs-on: ubuntu-22.04
93101
needs: doxygen_build
94102
steps:
95103
- name: Install dependencies
@@ -98,7 +106,8 @@ jobs:
98106
sudo apt-get -y update
99107
sudo apt-get -y install \
100108
autoconf-archive \
101-
clang-9 \
109+
clang-13 \
110+
clang-14 \
102111
dos2unix \
103112
graphviz \
104113
iwyu
@@ -146,7 +155,7 @@ jobs:
146155
147156
lint:
148157
name: Lint
149-
runs-on: ubuntu-20.04
158+
runs-on: ubuntu-22.04
150159
needs: boost_build
151160
steps:
152161
- name: Install dependencies
@@ -155,7 +164,8 @@ jobs:
155164
sudo apt-get -y update
156165
sudo apt-get -y install \
157166
autoconf-archive \
158-
clang-9 \
167+
clang-13 \
168+
clang-14 \
159169
dos2unix \
160170
graphviz \
161171
iwyu
@@ -197,7 +207,7 @@ jobs:
197207
198208
build:
199209
name: Build
200-
runs-on: ubuntu-20.04
210+
runs-on: ubuntu-22.04
201211
needs: boost_build
202212
steps:
203213
- name: Install dependencies
@@ -206,7 +216,8 @@ jobs:
206216
sudo apt-get -y update
207217
sudo apt-get -y install \
208218
autoconf-archive \
209-
clang-9 \
219+
clang-13 \
220+
clang-14 \
210221
dos2unix \
211222
graphviz \
212223
iwyu
@@ -261,7 +272,7 @@ jobs:
261272
262273
artifact:
263274
name: Artifact Collection
264-
runs-on: ubuntu-20.04
275+
runs-on: ubuntu-22.04
265276
needs: [ doxygen, build ]
266277
steps:
267278
- name: Restore documents

.github/workflows/linux-gcc.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,28 @@ on:
1313
branches: [ master ]
1414

1515
env:
16-
CONCURRENT_BUILD: 4
17-
GCC_COMMAND: gcc-10
18-
GXX_COMMAND: g++-10
19-
BOOST_VER: 1_79_0
20-
BOOST_VER_DOT: 1.79.0
21-
BOOST_TOOLSET: gcc
22-
BOOST_CACHE_REV: 0
16+
CONCURRENT_BUILD: 4
17+
GCC_COMMAND: gcc-12
18+
GXX_COMMAND: g++-12
19+
BOOST_VER: 1_79_0
20+
BOOST_VER_DOT: 1.79.0
21+
BOOST_BOOTSTRAP_TOOLSET: gcc
22+
BOOST_TOOLSET: gcc-12
23+
BOOST_CACHE_REV: 11
2324

2425
jobs:
2526
boost_build:
2627
name: Boost Build
27-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-22.04
2829
steps:
30+
- name: Install dependencies
31+
shell: bash
32+
run: |
33+
sudo apt-get -y update
34+
sudo apt-get -y install \
35+
gcc-12 \
36+
g++-12
37+
2938
- name: Cache Boost build
3039
uses: actions/cache@v2
3140
with:
@@ -42,22 +51,24 @@ jobs:
4251
curl -L -o boost_${{ env.BOOST_VER }}.tar.bz2 https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_VER_DOT }}/source/boost_${{ env.BOOST_VER }}.tar.bz2
4352
tar xvf boost_${{ env.BOOST_VER }}.tar.bz2
4453
cd boost_${{ env.BOOST_VER }}
45-
./bootstrap.sh --with-toolset=${{ env.BOOST_TOOLSET }}
54+
./bootstrap.sh --with-toolset=${{ env.BOOST_BOOTSTRAP_TOOLSET }}
4655
(./b2 -j ${{ env.CONCURRENT_BUILD }} toolset=${{ env.BOOST_TOOLSET }} variant=release link=static || :)
4756
touch .build_finished
4857
fi
4958
5059
build:
5160
name: Build
52-
runs-on: ubuntu-20.04
61+
runs-on: ubuntu-22.04
5362
needs: boost_build
5463
steps:
5564
- name: Install dependencies
5665
shell: bash
5766
run: |
5867
sudo apt-get -y update
5968
sudo apt-get -y install \
60-
autoconf-archive
69+
autoconf-archive \
70+
gcc-12 \
71+
g++-12
6172
6273
- name: Checkout
6374
uses: actions/checkout@v2

Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@ clean-doc:
5555
distclean-local: clean-doc
5656

5757
iwyu: ${SOURCE_SUBDIRS}
58-
for f in $$(find -name "*.iwyuout"); do ${top_srcdir}/kogyan/tool/filter_iwyuout.py < $$f; done
58+
IWYU_EXIT_CODE="0"; \
59+
for f in $$(find -name "*.iwyuout"); \
60+
do \
61+
${top_srcdir}/kogyan/tool/filter_iwyuout.py < $$f; \
62+
IWYU_EXIT_CODE_ITER=$$?; \
63+
test "x$$IWYU_EXIT_CODE" == "x0" && IWYU_EXIT_CODE=$$IWYU_EXIT_CODE_ITER; \
64+
done; \
65+
exit $$IWYU_EXIT_CODE
5966

6067
clean-iwyu: ${SOURCE_SUBDIRS}
6168

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,19 @@ Doxygen will output the documents into the directory `doc`.
138138

139139
#### Requirements
140140

141-
- [Clang 11](https://clang.llvm.org/) or
142-
[GCC 10](https://gcc.gnu.org/)
141+
- [Clang 11](https://clang.llvm.org/),
142+
[Clang 14](https://clang.llvm.org/),
143+
[GCC 10](https://gcc.gnu.org/) or
144+
[GCC 12](https://gcc.gnu.org/)
143145
- [Boost C++ libraries 1.79.0](https://www.boost.org/)
144146
- [Doxygen 1.9.3](https://www.doxygen.nl/)
145147
- [Graphviz](https://www.graphviz.org/)
146-
- [include-what-you-use 0.12](https://include-what-you-use.org/) or
147-
[include-what-you-use 0.15](https://include-what-you-use.org/)
148+
- [include-what-you-use 0.15](https://include-what-you-use.org/) or
149+
[include-what-you-use 0.17](https://include-what-you-use.org/)
148150
- [Clang Format 11](https://clang.llvm.org/docs/ClangFormat.html)
149151
- [Dos2Unix](https://waterlan.home.xs4all.nl/dos2unix.html)
150-
- [Python 3.8](https://www.python.org/) or
151-
[Python 3.9](https://www.python.org/)
152+
- [Python 3.9](https://www.python.org/) or
153+
[Python 3.10](https://www.python.org/)
152154
- [mypy](http://www.mypy-lang.org/)
153155
- [Black](https://black.readthedocs.io/en/stable/)
154156
- [isort](https://pycqa.github.io/isort/)

configure.ac

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ AC_LANG([C++])
107107

108108
#### Program Checks ####
109109
AC_PROG_CXX
110-
AC_PROG_CC_C99
110+
AC_PROG_CC
111111
AC_PROG_CPP
112-
AC_PROG_LIBTOOL
113112
LT_INIT
114113

115114
AC_ARG_WITH(
@@ -151,14 +150,17 @@ AC_ARG_WITH(
151150
BLACK=$withval
152151
)
153152
AC_CHECK_PROG(BLACK, black, black)
153+
test -z $BLACK && \
154+
AC_MSG_WARN([You cannot format the python script files for lack of black.])
155+
154156
AC_ARG_WITH(
155157
isort,
156158
AS_HELP_STRING([--with-isort=COMMAND], [Specify the isort command. Or uses `isort'.]),
157159
ISORT=$withval
158160
)
159161
AC_CHECK_PROG(ISORT, isort, isort)
160162
test -z $ISORT && \
161-
AC_MSG_WARN([You cannot format the python script files for lack of black and/or isort.])
163+
AC_MSG_WARN([You cannot format the python script files for lack of isort.])
162164

163165
AC_ARG_WITH(
164166
mypy,
@@ -191,14 +193,10 @@ AC_SUBST([LDFLAGS], "${LDFLAGS} ${BOOST_LDFLAGS}")
191193
AC_SUBST([LIBS], "-lstdc++fs -lstdc++ ${LIBS}")
192194

193195
#### Header Checks ####
194-
AC_CXX_HAVE_STD
195-
AC_CXX_HAVE_STL
196-
AC_HEADER_STDC
197-
198196
AC_SUBST([CPPFLAGS], "${CPPFLAGS} ${BOOST_CPPFLAGS}")
199197

200198
#### Compilation Options ####
201-
AC_SUBST([CXXFLAGS_IWYU], "${CXXFLAGS} -std=c++2a -Werror -Wall -Wextra -pedantic-errors")
199+
AC_SUBST([CXXFLAGS_IWYU], "${CXXFLAGS} -std=c++20 -Werror -Wall -Wextra -pedantic-errors")
202200
AC_SUBST([CXXFLAGS], "${CXXFLAGS} -std=c++20 -Werror -Wall -Wextra -pedantic-errors")
203201
AC_SUBST([CFLAGS], "${CFLAGS} -std=c17 -Werror -Wall -Wextra -pedantic-errors")
204202

library/json/cpp/include/tetengo/json/stream_reader.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#if !defined(TETENGO_JSON_STREAMREADER_HPP)
88
#define TETENGO_JSON_STREAMREADER_HPP
99

10+
#include <cstddef> // IWYU pragma: keep
1011
#include <istream>
1112
#include <memory>
1213

library/json/cpp/src/tetengo.json.channel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ namespace tetengo::json
121121
m_condition_variable.wait(lock, [this]() { return can_insert(); });
122122
if (!can_take() || m_queue.back())
123123
{
124-
m_queue.push(std::nullopt);
124+
decltype(m_queue)::value_type nullopt_{};
125+
m_queue.push(nullopt_);
125126
}
126127
m_condition_variable.notify_all();
127128
}

library/json/cpp/src/tetengo.json.stream_reader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
55
*/
66

7+
#include <cstddef> // IWYU pragma: keep
78
#include <istream>
89
#include <iterator>
910
#include <memory>

library/json/test/src/test_tetengo.json.element.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
55
*/
66

7-
#include <algorithm>
7+
#include <algorithm> // IWYU pragma: keep
88
#include <iterator>
99
#include <stdexcept>
1010
#include <string>

library/platform_dependent/cpp/src/unixos/tetengo.platform_dependent.text_X.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include <errno.h>
1717
#include <iconv.h>
18-
#include <stddef.h>
18+
#include <stddef.h> // IWYU pragma: keep
1919

2020
#include <boost/core/noncopyable.hpp>
2121
#include <boost/preprocessor.hpp>

0 commit comments

Comments
 (0)