Skip to content

Commit 2a3c8de

Browse files
pmaiHabedank Clemens
authored andcommitted
Add Proto3 Test Builds
Signed-off-by: Pierre R. Mai <pmai@pmsf.de> Signed-off-by: Habedank Clemens <qxs2704@europe.bmw.corp>
1 parent eb1e008 commit 2a3c8de

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/protobuf.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,66 @@ jobs:
8383
path: doc/html
8484
if-no-files-found: error
8585

86+
build-proto3-linux64:
87+
name: Build Proto3 Linux 64
88+
89+
runs-on: ubuntu-18.04
90+
91+
steps:
92+
- name: Checkout OSI
93+
uses: actions/checkout@v2
94+
with:
95+
submodules: true
96+
97+
- name: Setup Python
98+
uses: actions/setup-python@v2
99+
with:
100+
python-version: '3.7'
101+
102+
- name: Install Python Dependencies
103+
run: python -m pip install --upgrade pip setuptools wheel pyyaml
104+
105+
- name: Cache Dependencies
106+
id: cache-depends
107+
uses: actions/cache@v2
108+
with:
109+
path: protobuf-3.11.3
110+
key: ${{ runner.os }}-v1-depends
111+
112+
- name: Download ProtoBuf
113+
if: steps.cache-depends.outputs.cache-hit != 'true'
114+
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protobuf-all-3.11.3.tar.gz && tar xzvf protobuf-all-3.11.3.tar.gz
115+
116+
- name: Build ProtoBuf
117+
if: steps.cache-depends.outputs.cache-hit != 'true'
118+
working-directory: protobuf-3.11.3
119+
run: ./configure DIST_LANG=cpp --prefix=/usr && make
120+
121+
- name: Install ProtoBuf
122+
working-directory: protobuf-3.11.3
123+
run: sudo make install && sudo ldconfig
124+
125+
- name: Prepare C++ Build
126+
run: mkdir build
127+
128+
- name: Switch to Proto3 Syntax
129+
run: |
130+
bash convert-to-proto3.sh
131+
rm *.pb2
132+
133+
- name: Configure C++ Build
134+
working-directory: build
135+
run: cmake ..
136+
137+
- name: Build C++
138+
working-directory: build
139+
run: cmake --build . --config Release -j 4
140+
141+
- name: Build Python
142+
run: python setup.py build && python setup.py sdist
143+
144+
- name: Install Python
145+
run: python -m pip install .
146+
147+
- name: Run Python Tests
148+
run: python -m unittest discover tests

0 commit comments

Comments
 (0)