Skip to content

Commit 75c0083

Browse files
committed
Fix compile errors of json2pb
1 parent ba9e838 commit 75c0083

9 files changed

Lines changed: 124 additions & 232 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
inputs:
2+
options:
3+
description: extra options for config_brpc.sh
4+
required: false
5+
runs:
6+
using: "composite"
7+
steps:
8+
- run: |
9+
sh config_brpc.sh --nodebugsymbols ${{inputs.options}}
10+
cat config.mk && make clean && make -j ${{env.proc_num}}
11+
shell: bash

.github/actions/init-make-config/action.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
runs:
22
using: "composite"
33
steps:
4-
- uses: ./.github/actions/install-essential-dependences
4+
- uses: ./.github/actions/install-essential-dependencies
55
- run: sudo apt-get install -y libunwind-dev libgoogle-glog-dev automake bison flex libboost-all-dev libevent-dev libtool pkg-config libibverbs1 libibverbs-dev
66
shell: bash
77
- run: wget https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && tar -xf thrift-0.11.0.tar.gz
88
shell: bash
9-
- run: cd thrift-0.11.0/ && ./configure --prefix=/usr --with-rs=no --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no --with-haskell=no --with-dotnetcore=no CXXFLAGS="-Wno-unused-variable" && make -j $(nproc) && sudo make install
9+
- run: cd thrift-0.11.0/ && ./configure --prefix=/usr --with-rs=no --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no --with-haskell=no --with-dotnetcore=no CXXFLAGS="-Wno-unused-variable" && make -j ${{env.proc_num}} && sudo make install
1010
shell: bash
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
inputs:
2+
protobuf-version:
3+
description: version of protobuf
4+
required: true
5+
protobuf-cpp-version:
6+
description: version of protobuf-cpp
7+
required: true
8+
protobuf-install-dir:
9+
description: install directory of protobuf
10+
required: true
11+
config-brpc-options:
12+
description: extra options for config_brpc.sh
13+
required: true
14+
runs:
15+
using: "composite"
16+
steps:
17+
- run: |
18+
wget https://github.com/protocolbuffers/protobuf/releases/download/v${{inputs.protobuf-version}}/protobuf-cpp-${{inputs.protobuf-cpp-version}}.tar.gz
19+
tar -xf protobuf-cpp-${{inputs.protobuf-cpp-version}}.tar.gz
20+
cd protobuf-${{inputs.protobuf-cpp-version}}
21+
./configure --prefix=${{inputs.protobuf-install-dir}} --with-pic --disable-java --disable-python --disable-other-languages
22+
sudo mkdir ${{inputs.protobuf-install-dir}}
23+
make -j ${{env.proc_num}} && sudo make install
24+
shell: bash
25+
- uses: ./.github/actions/compile-with-make
26+
with:
27+
options: --headers="${{inputs.protobuf-install-dir}}/include /usr/include" --libs="${{inputs.protobuf-install-dir}} /usr/lib /usr/lib64" ${{inputs.config-brpc-options}}

.github/actions/install-essential-dependences/action.yml renamed to .github/actions/install-essential-dependencies/action.yml

File renamed without changes.

.github/workflows/ci-linux.yml

Lines changed: 67 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -14,186 +14,90 @@ env:
1414
proc_num: $(nproc)
1515

1616
jobs:
17-
gcc-compile-with-make:
17+
compile-with-make:
1818
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images
1919
steps:
2020
- uses: actions/checkout@v2
21-
- uses: ./.github/actions/install-essential-dependences
22-
- uses: ./.github/actions/init-make-config
21+
- uses: ./.github/actions/install-all-dependencies
22+
23+
- name: gcc with default options
24+
uses: ./.github/actions/compile-with-make
2325
with:
24-
options: --cc=gcc --cxx=g++ --werror
25-
- name: compile
26-
run: |
27-
make -j ${{env.proc_num}}
26+
options: --headers=/usr/include --libs=/usr/lib /usr/lib64 --cc=gcc --cxx=g++ --werror
2827

29-
gcc-compile-with-cmake:
30-
runs-on: ubuntu-22.04
31-
steps:
32-
- uses: actions/checkout@v2
33-
- uses: ./.github/actions/install-essential-dependences
34-
- name: cmake
35-
run: |
36-
export CC=gcc && export CXX=g++
37-
mkdir build
38-
cd build
39-
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
40-
- name: compile
41-
run: |
42-
cd build
43-
make -j ${{env.proc_num}}
44-
45-
gcc-compile-with-bazel:
46-
runs-on: ubuntu-22.04
47-
steps:
48-
- uses: actions/checkout@v2
49-
- run: bazel build --verbose_failures -- //... -//example/...
28+
- name: gcc with all options
29+
uses: ./.github/actions/compile-with-make
30+
with:
31+
options: --headers=/usr/include --libs=/usr/lib /usr/lib64 --cc=gcc --cxx=g++ --werror --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer --with-asan
5032

51-
gcc-compile-with-boringssl:
52-
runs-on: ubuntu-22.04
53-
steps:
54-
- uses: actions/checkout@v2
55-
- run: bazel build --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
33+
- name: clang with default options
34+
uses: ./.github/actions/compile-with-make
35+
with:
36+
options: --headers=/usr/include --libs=/usr/lib /usr/lib64 --cc=clang --cxx=clang++ --werror
5637

57-
gcc-compile-with-make-all-options:
58-
runs-on: ubuntu-22.04
59-
steps:
60-
- uses: actions/checkout@v2
61-
- uses: ./.github/actions/install-all-dependences
62-
- uses: ./.github/actions/init-make-config
38+
- name: clang with all options
39+
uses: ./.github/actions/compile-with-make
6340
with:
64-
options: --cc=gcc --cxx=g++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer --werror --with-asan
65-
- name: compile
66-
run: |
67-
make -j ${{env.proc_num}}
41+
options: --headers=/usr/include --libs=/usr/lib /usr/lib64 --cc=clang --cxx=clang++ --werror --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer --with-asan
6842

69-
gcc-compile-with-cmake-all-options:
43+
compile-with-cmake:
7044
runs-on: ubuntu-22.04
7145
steps:
72-
- uses: actions/checkout@v2
73-
- uses: ./.github/actions/install-all-dependences
74-
- name: cmake
75-
run: |
76-
export CC=gcc && export CXX=g++
77-
mkdir build
78-
cd build
79-
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -DWITH_BTHREAD_TRACER=ON -DWITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
80-
- name: compile
81-
run: |
82-
cd build
83-
make -j ${{env.proc_num}}
84-
85-
gcc-compile-with-bazel-all-options:
86-
runs-on: ubuntu-22.04
87-
steps:
88-
- uses: actions/checkout@v2
89-
- run: bazel build --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true --define with_asan=true -- //... -//example/...
46+
- uses: actions/checkout@v2
47+
- uses: ./.github/actions/install-all-dependencies
9048

91-
clang-compile-with-make:
92-
runs-on: ubuntu-22.04
93-
steps:
94-
- uses: actions/checkout@v2
95-
- uses: ./.github/actions/install-essential-dependences
96-
- uses: ./.github/actions/init-make-config
97-
with:
98-
options: --cc=clang --cxx=clang++ --werror
99-
- name: compile
100-
run: |
101-
make -j ${{env.proc_num}}
49+
- name: gcc with default options
50+
run: |
51+
export CC=gcc && export CXX=g++
52+
mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
53+
make -j ${{env.proc_num}} && make clean
10254
103-
clang-compile-with-cmake:
104-
runs-on: ubuntu-22.04
105-
steps:
106-
- uses: actions/checkout@v2
107-
- uses: ./.github/actions/install-essential-dependences
108-
- name: cmake
109-
run: |
110-
export CC=clang && export CXX=clang++
111-
mkdir build
112-
cd build
113-
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
114-
- name: compile
115-
run: |
116-
cd build
117-
make -j ${{env.proc_num}}
118-
119-
clang-compile-with-bazel:
120-
runs-on: ubuntu-22.04
121-
steps:
122-
- uses: actions/checkout@v2
123-
- run: bazel build --verbose_failures --action_env=CC=clang -- //... -//example/...
55+
- name: gcc with all options
56+
run: |
57+
export CC=gcc && export CXX=g++
58+
mkdir build && cd build
59+
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -DWITH_BTHREAD_TRACER=ON -DWITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
60+
make -j ${{env.proc_num}} && make clean
12461
125-
clang-compile-with-boringssl:
126-
runs-on: ubuntu-22.04
127-
steps:
128-
- uses: actions/checkout@v2
129-
- run: bazel build --verbose_failures --action_env=CC=clang --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
62+
- name: clang with default options
63+
run: |
64+
export CC=clang && export CXX=clang++
65+
mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
66+
make -j ${{env.proc_num}} && make clean
13067
131-
clang-compile-with-make-all-options:
132-
runs-on: ubuntu-22.04
133-
steps:
134-
- uses: actions/checkout@v2
135-
- uses: ./.github/actions/install-all-dependences
136-
- uses: ./.github/actions/init-make-config
137-
with:
138-
options: --cc=clang --cxx=clang++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer --werror --with-asan
139-
- name: compile
140-
run: |
141-
make -j ${{env.proc_num}}
68+
- name: clang with all options
69+
run: |
70+
export CC=clang && export CXX=clang++
71+
mkdir build && cd build
72+
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -DWITH_BTHREAD_TRACER=ON -DWITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
73+
make -j ${{env.proc_num}} && make clean
14274
143-
clang-compile-with-cmake-all-options:
144-
runs-on: ubuntu-22.04
145-
steps:
146-
- uses: actions/checkout@v2
147-
- uses: ./.github/actions/install-all-dependences
148-
- name: cmake
149-
run: |
150-
export CC=clang && export CXX=clang++
151-
mkdir build
152-
cd build
153-
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -DWITH_BTHREAD_TRACER=ON -DWITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
154-
- name: compile
155-
run: |
156-
cd build
157-
make -j ${{env.proc_num}}
158-
159-
clang-compile-with-bazel-all-options:
160-
runs-on: ubuntu-22.04
75+
gcc-compile-with-make-protobuf:
76+
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images
16177
steps:
16278
- uses: actions/checkout@v2
163-
- run: bazel build --verbose_failures --action_env=CC=clang --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true --define with_asan=true -- //... -//example/...
79+
- uses: ./.github/actions/install-essential-dependencies
16480

165-
clang-unittest:
166-
runs-on: ubuntu-22.04
167-
steps:
168-
- uses: actions/checkout@v2
169-
- uses: ./.github/actions/install-essential-dependences
170-
- uses: ./.github/actions/init-ut-make-config
171-
with:
172-
options: --cc=clang-12 --cxx=clang++-12 --with-bthread-tracer
173-
- name: compile tests
174-
run: |
175-
cat config.mk
176-
cd test
177-
make -j ${{env.proc_num}}
178-
- name: run tests
179-
run: |
180-
cd test
181-
sh ./run_tests.sh
81+
- name: protobuf 3.5.1
82+
uses: ./.github/actions/install-essential-dependencies-protobuf
83+
with:
84+
protobuf-version: 3.5.1
85+
protobuf-cpp-version: 3.5.1
86+
protobuf-install-dir: /protobuf-3.5.1
87+
config-brpc-options: --cc=gcc --cxx=g++ --werror
18288

183-
clang-unittest-asan:
184-
runs-on: ubuntu-22.04
185-
steps:
186-
- uses: actions/checkout@v2
187-
- uses: ./.github/actions/install-essential-dependences
188-
- uses: ./.github/actions/init-ut-make-config
189-
with:
190-
options: --cc=clang-12 --cxx=clang++-12 --with-bthread-tracer --with-asan
191-
- name: compile tests
192-
run: |
193-
cat config.mk
194-
cd test
195-
make NEED_GPERFTOOLS=0 -j ${{env.proc_num}}
196-
- name: run tests
197-
run: |
198-
cd test
199-
sh ./run_tests.sh
89+
- name: protobuf 3.12.4
90+
uses: ./.github/actions/install-essential-dependencies-protobuf
91+
with:
92+
protobuf-version: 3.12.4
93+
protobuf-cpp-version: 3.12.4
94+
protobuf-install-dir: /protobuf-3.12.4
95+
config-brpc-options: --cc=gcc --cxx=g++ --werror
96+
97+
- name: protobuf 21.12
98+
uses: ./.github/actions/install-essential-dependencies-protobuf
99+
with:
100+
protobuf-version: 21.12
101+
protobuf-cpp-version: 3.21.12
102+
protobuf-install-dir: /protobuf-3.21.12
103+
config-brpc-options: --cc=gcc --cxx=g++ --werror

0 commit comments

Comments
 (0)