Skip to content

Commit

Permalink
Merge pull request #243 from tetengo/v1.6.1-ubuntu_upgrade
Browse files Browse the repository at this point in the history
V1.6.1 ubuntu upgrade
  • Loading branch information
kaorut authored Jun 11, 2022
2 parents bb572e4 + 2bf6e19 commit 615608b
Show file tree
Hide file tree
Showing 32 changed files with 109 additions and 64 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/linux-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ on:
branches: [ master ]

env:
CONCURRENT_BUILD: 4
CLANG_COMMAND: clang-11
CLANGXX_COMMAND: clang++-11
DOXYGEN_VER: 1.9.3
DOXYGEN_CACHE_REV: 0
BOOST_VER: 1_79_0
BOOST_VER_DOT: 1.79.0
BOOST_TOOLSET: clang
BOOST_CACHE_REV: 0
CONCURRENT_BUILD: 4
CLANG_COMMAND: clang-14
CLANGXX_COMMAND: clang++-14
DOXYGEN_VER: 1.9.3
DOXYGEN_CACHE_REV: 0
BOOST_VER: 1_79_0
BOOST_VER_DOT: 1.79.0
BOOST_BOOTSTRAP_TOOLSET: clang
BOOST_TOOLSET: clang-14
BOOST_CACHE_REV: 12

jobs:
doxygen_build:
name: Doxygen Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -64,8 +65,15 @@ jobs:
boost_build:
name: Boost Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install \
clang-14
- name: Cache Boost build
uses: actions/cache@v2
with:
Expand All @@ -82,14 +90,14 @@ jobs:
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
tar -xf boost_${{ env.BOOST_VER }}.tar.bz2
cd boost_${{ env.BOOST_VER }}
./bootstrap.sh --with-toolset=${{ env.BOOST_TOOLSET }}
./bootstrap.sh --with-toolset=${{ env.BOOST_BOOTSTRAP_TOOLSET }}
(./b2 -j ${{ env.CONCURRENT_BUILD }} toolset=${{ env.BOOST_TOOLSET }} variant=release link=static || :)
touch .build_finished
fi
doxygen:
name: Doxygen
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: doxygen_build
steps:
- name: Install dependencies
Expand All @@ -98,7 +106,8 @@ jobs:
sudo apt-get -y update
sudo apt-get -y install \
autoconf-archive \
clang-9 \
clang-13 \
clang-14 \
dos2unix \
graphviz \
iwyu
Expand Down Expand Up @@ -146,7 +155,7 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: boost_build
steps:
- name: Install dependencies
Expand All @@ -155,7 +164,8 @@ jobs:
sudo apt-get -y update
sudo apt-get -y install \
autoconf-archive \
clang-9 \
clang-13 \
clang-14 \
dos2unix \
graphviz \
iwyu
Expand Down Expand Up @@ -197,7 +207,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: boost_build
steps:
- name: Install dependencies
Expand All @@ -206,7 +216,8 @@ jobs:
sudo apt-get -y update
sudo apt-get -y install \
autoconf-archive \
clang-9 \
clang-13 \
clang-14 \
dos2unix \
graphviz \
iwyu
Expand Down Expand Up @@ -261,7 +272,7 @@ jobs:
artifact:
name: Artifact Collection
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [ doxygen, build ]
steps:
- name: Restore documents
Expand Down
33 changes: 22 additions & 11 deletions .github/workflows/linux-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,28 @@ on:
branches: [ master ]

env:
CONCURRENT_BUILD: 4
GCC_COMMAND: gcc-10
GXX_COMMAND: g++-10
BOOST_VER: 1_79_0
BOOST_VER_DOT: 1.79.0
BOOST_TOOLSET: gcc
BOOST_CACHE_REV: 0
CONCURRENT_BUILD: 4
GCC_COMMAND: gcc-12
GXX_COMMAND: g++-12
BOOST_VER: 1_79_0
BOOST_VER_DOT: 1.79.0
BOOST_BOOTSTRAP_TOOLSET: gcc
BOOST_TOOLSET: gcc-12
BOOST_CACHE_REV: 11

jobs:
boost_build:
name: Boost Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install \
gcc-12 \
g++-12
- name: Cache Boost build
uses: actions/cache@v2
with:
Expand All @@ -42,22 +51,24 @@ jobs:
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
tar xvf boost_${{ env.BOOST_VER }}.tar.bz2
cd boost_${{ env.BOOST_VER }}
./bootstrap.sh --with-toolset=${{ env.BOOST_TOOLSET }}
./bootstrap.sh --with-toolset=${{ env.BOOST_BOOTSTRAP_TOOLSET }}
(./b2 -j ${{ env.CONCURRENT_BUILD }} toolset=${{ env.BOOST_TOOLSET }} variant=release link=static || :)
touch .build_finished
fi
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: boost_build
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install \
autoconf-archive
autoconf-archive \
gcc-12 \
g++-12
- name: Checkout
uses: actions/checkout@v2
Expand Down
9 changes: 8 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ clean-doc:
distclean-local: clean-doc

iwyu: ${SOURCE_SUBDIRS}
for f in $$(find -name "*.iwyuout"); do ${top_srcdir}/kogyan/tool/filter_iwyuout.py < $$f; done
IWYU_EXIT_CODE="0"; \
for f in $$(find -name "*.iwyuout"); \
do \
${top_srcdir}/kogyan/tool/filter_iwyuout.py < $$f; \
IWYU_EXIT_CODE_ITER=$$?; \
test "x$$IWYU_EXIT_CODE" == "x0" && IWYU_EXIT_CODE=$$IWYU_EXIT_CODE_ITER; \
done; \
exit $$IWYU_EXIT_CODE

clean-iwyu: ${SOURCE_SUBDIRS}

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,19 @@ Doxygen will output the documents into the directory `doc`.

#### Requirements

- [Clang 11](https://clang.llvm.org/) or
[GCC 10](https://gcc.gnu.org/)
- [Clang 11](https://clang.llvm.org/),
[Clang 14](https://clang.llvm.org/),
[GCC 10](https://gcc.gnu.org/) or
[GCC 12](https://gcc.gnu.org/)
- [Boost C++ libraries 1.79.0](https://www.boost.org/)
- [Doxygen 1.9.3](https://www.doxygen.nl/)
- [Graphviz](https://www.graphviz.org/)
- [include-what-you-use 0.12](https://include-what-you-use.org/) or
[include-what-you-use 0.15](https://include-what-you-use.org/)
- [include-what-you-use 0.15](https://include-what-you-use.org/) or
[include-what-you-use 0.17](https://include-what-you-use.org/)
- [Clang Format 11](https://clang.llvm.org/docs/ClangFormat.html)
- [Dos2Unix](https://waterlan.home.xs4all.nl/dos2unix.html)
- [Python 3.8](https://www.python.org/) or
[Python 3.9](https://www.python.org/)
- [Python 3.9](https://www.python.org/) or
[Python 3.10](https://www.python.org/)
- [mypy](http://www.mypy-lang.org/)
- [Black](https://black.readthedocs.io/en/stable/)
- [isort](https://pycqa.github.io/isort/)
Expand Down
14 changes: 6 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ AC_LANG([C++])

#### Program Checks ####
AC_PROG_CXX
AC_PROG_CC_C99
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL
LT_INIT

AC_ARG_WITH(
Expand Down Expand Up @@ -151,14 +150,17 @@ AC_ARG_WITH(
BLACK=$withval
)
AC_CHECK_PROG(BLACK, black, black)
test -z $BLACK && \
AC_MSG_WARN([You cannot format the python script files for lack of black.])

AC_ARG_WITH(
isort,
AS_HELP_STRING([--with-isort=COMMAND], [Specify the isort command. Or uses `isort'.]),
ISORT=$withval
)
AC_CHECK_PROG(ISORT, isort, isort)
test -z $ISORT && \
AC_MSG_WARN([You cannot format the python script files for lack of black and/or isort.])
AC_MSG_WARN([You cannot format the python script files for lack of isort.])

AC_ARG_WITH(
mypy,
Expand Down Expand Up @@ -191,14 +193,10 @@ AC_SUBST([LDFLAGS], "${LDFLAGS} ${BOOST_LDFLAGS}")
AC_SUBST([LIBS], "-lstdc++fs -lstdc++ ${LIBS}")

#### Header Checks ####
AC_CXX_HAVE_STD
AC_CXX_HAVE_STL
AC_HEADER_STDC

AC_SUBST([CPPFLAGS], "${CPPFLAGS} ${BOOST_CPPFLAGS}")

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

Expand Down
1 change: 1 addition & 0 deletions library/json/cpp/include/tetengo/json/stream_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#if !defined(TETENGO_JSON_STREAMREADER_HPP)
#define TETENGO_JSON_STREAMREADER_HPP

#include <cstddef> // IWYU pragma: keep
#include <istream>
#include <memory>

Expand Down
3 changes: 2 additions & 1 deletion library/json/cpp/src/tetengo.json.channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ namespace tetengo::json
m_condition_variable.wait(lock, [this]() { return can_insert(); });
if (!can_take() || m_queue.back())
{
m_queue.push(std::nullopt);
decltype(m_queue)::value_type nullopt_{};
m_queue.push(nullopt_);
}
m_condition_variable.notify_all();
}
Expand Down
1 change: 1 addition & 0 deletions library/json/cpp/src/tetengo.json.stream_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
*/

#include <cstddef> // IWYU pragma: keep
#include <istream>
#include <iterator>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion library/json/test/src/test_tetengo.json.element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
*/

#include <algorithm>
#include <algorithm> // IWYU pragma: keep
#include <iterator>
#include <stdexcept>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <errno.h>
#include <iconv.h>
#include <stddef.h>
#include <stddef.h> // IWYU pragma: keep

#include <boost/core/noncopyable.hpp>
#include <boost/preprocessor.hpp>
Expand Down
1 change: 1 addition & 0 deletions library/property/cpp/src/tetengo.property.file_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
*/

#include <cstddef> // IWYU pragma: keep
#include <filesystem>
#include <fstream>
#include <memory>
Expand Down
3 changes: 2 additions & 1 deletion library/property/cpp/src/tetengo.property.json_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <cassert>
#include <cstddef> // IWYU pragma: keep
#include <cstdint>
#include <filesystem>
#include <iterator>
Expand All @@ -15,7 +16,7 @@
#include <ostream>
#include <string>
#include <string_view>
#include <type_traits>
#include <type_traits> // IWYU pragma: keep
#include <unordered_map>
#include <utility>
#include <variant>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <type_traits> // IWYU pragma: keep
#include <unordered_map>
#include <utility>
#include <variant> // IWYU pragma: keep

#include <boost/core/noncopyable.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright (C) 2019-2022 kaoru https://www.tetengo.org/
*/

#include <cstddef> // IWYU pragma: keep
#include <cstdint>
#include <filesystem>
#include <fstream>
Expand All @@ -15,8 +16,6 @@
#include <system_error>
#include <vector>

#include <stddef.h>

#include <boost/core/noncopyable.hpp>
#include <boost/preprocessor.hpp>
#include <boost/scope_exit.hpp>
Expand Down
1 change: 1 addition & 0 deletions library/trie/cpp/include/tetengo/trie/memory_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define TETENGO_TRIE_MEMORYSTORAGE_HPP

#include <any>
#include <cstddef> // IWYU pragma: keep
#include <cstdint>
#include <istream>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions library/trie/cpp/include/tetengo/trie/mmap_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define TETENGO_TRIE_MMAPSTORAGE_HPP

#include <any>
#include <cstddef> // IWYU pragma: keep
#include <cstdint>
#include <istream>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions library/trie/cpp/include/tetengo/trie/shared_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define TETENGO_TRIE_SHAREDSTORAGE_HPP

#include <any>
#include <cstddef> // IWYU pragma: keep
#include <cstdint>
#include <istream>
#include <memory>
Expand Down
Loading

0 comments on commit 615608b

Please sign in to comment.