Skip to content

Commit b2af924

Browse files
authored
Update hunter (#17)
* Update outcome and hunter
1 parent 9263204 commit b2af924

File tree

6 files changed

+37
-26
lines changed

6 files changed

+37
-26
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ jobs:
2727
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
2828
- name: build
2929
env:
30-
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
30+
DEVELOPER_DIR: /Applications/Xcode_13.3.app/Contents/Developer
3131
run: ./scripts/build.sh
3232

3333
Linux:
3434
strategy:
3535
fail-fast: false
3636
matrix:
3737
options:
38-
- name: "Linux: gcc-9"
39-
run: ./scripts/build.sh -DCMAKE_CXX_COMPILER=g++-9
40-
- name: "Linux: clang-10"
41-
run: ./scripts/build.sh -DCMAKE_CXX_COMPILER=clang++-10
38+
- name: "Linux: gcc-12"
39+
run: ./scripts/build.sh -DCMAKE_CXX_COMPILER=g++-12
40+
- name: "Linux: clang-14"
41+
run: ./scripts/build.sh -DCMAKE_CXX_COMPILER=clang++
4242
name: "${{ matrix.options.name }}"
4343
runs-on: ubuntu-latest
4444
steps:

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ cmake_minimum_required(VERSION 3.12)
88
include(${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake)
99

1010
HunterGate(
11-
URL https://github.com/soramitsu/soramitsu-hunter/archive/tags/v0.23.257-soramitsu17.tar.gz
12-
SHA1 c7ccd337314b27485b75d0f0f5d5b42e7e3c2629
11+
URL "https://github.com/soramitsu/soramitsu-hunter/archive/v0.23.257-soramitsu42.tar.gz"
12+
SHA1 "6f54ad82c2322ff0e234ab96a44a12da1478f1be"
1313
)
1414

1515
project(Scale LANGUAGES CXX VERSION 1.0.0)

docker/ci.Dockerfile

+18-18
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ RUN apt-get update && \
1818
# add repos for llvm and newer gcc and install docker
1919
RUN apt-get update && apt-get install --no-install-recommends -y \
2020
build-essential \
21-
gcc-9 \
22-
g++-9 \
23-
llvm-9-dev \
24-
clang-9 \
25-
clang-tidy-9 \
26-
clang-format-9 \
21+
gcc-12 \
22+
g++-12 \
23+
llvm-14-dev \
24+
clang-14 \
25+
clang-tidy-14 \
26+
clang-format-14 \
2727
make \
2828
git \
2929
ccache \
@@ -47,18 +47,18 @@ RUN set -e; \
4747
rm -rf /tmp/sonar*
4848

4949
# set env
50-
ENV LLVM_ROOT=/usr/lib/llvm-9
51-
ENV LLVM_DIR=/usr/lib/llvm-9/lib/cmake/llvm/
50+
ENV LLVM_ROOT=/usr/lib/llvm-14
51+
ENV LLVM_DIR=/usr/lib/llvm-14/lib/cmake/llvm/
5252
ENV PATH=${LLVM_ROOT}/bin:${LLVM_ROOT}/share/clang:${PATH}
53-
ENV CC=gcc-9
54-
ENV CXX=g++-9
53+
ENV CC=gcc-12
54+
ENV CXX=g++-12
5555

5656
# set default compilers and tools
57-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 90 && \
58-
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-9 90 && \
59-
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-9 90 && \
60-
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-9/bin/clang-9 90 && \
61-
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 90 && \
62-
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 && \
63-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 && \
64-
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 90
57+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 90 && \
58+
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 90 && \
59+
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 90 && \
60+
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-14/bin/clang-14 90 && \
61+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 90 && \
62+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90 && \
63+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 90 && \
64+
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 90

include/scale/outcome/outcome.hpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ using result = basic_result<R, S, NoValuePolicy>;
2525

2626
} // namespace scale::outcome
2727

28-
#define OUTCOME_TRY(...) BOOST_OUTCOME_TRY(__VA_ARGS__)
28+
// To define OUTCOME_TRY macro, we will need to create OUTCOME_TRY_1 and
29+
// OUTCOME_TRY_2 depending on number of arguments
30+
#define OUTCOME_TRY_1(...) BOOST_OUTCOME_TRY(__VA_ARGS__)
31+
#define OUTCOME_TRY_2(...) BOOST_OUTCOME_TRY(auto __VA_ARGS__)
32+
33+
// trick from https://stackoverflow.com/a/11763277 to overload OUTCOME_TRY
34+
#define GET_MACRO(_1, _2, NAME, ...) NAME
35+
#define OUTCOME_TRY(...) \
36+
GET_MACRO(__VA_ARGS__, OUTCOME_TRY_2, OUTCOME_TRY_1)(__VA_ARGS__)
2937

3038
#endif // SCALE_OUTCOME_OUTCOME

include/scale/scale_decoder_stream.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#define SCALE_CORE_SCALE_SCALE_DECODER_STREAM_HPP
88

99
#include <array>
10+
#include <deque>
1011
#include <iterator>
12+
#include <list>
1113
#include <optional>
1214

1315
#include <boost/variant.hpp>

include/scale/scale_encoder_stream.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define SCALE_CORE_SCALE_SCALE_ENCODER_STREAM_HPP
88

99
#include <deque>
10+
#include <list>
1011
#include <optional>
1112

1213
#include <boost/variant.hpp>

0 commit comments

Comments
 (0)