-
Notifications
You must be signed in to change notification settings - Fork 129
222 lines (175 loc) · 6.06 KB
/
protobuf.yml
File metadata and controls
222 lines (175 loc) · 6.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: ProtoBuf CI Builds
on:
push:
pull_request:
branches: [ master ]
jobs:
<<<<<<< HEAD
<<<<<<< HEAD
build-proto2-linux64:
name: Build Proto2 Linux 64
=======
build-cpp-linux64:
name: Build C++ Linux 64
>>>>>>> Initial GitHub Actions CPP ProtoBuf Build
=======
build-proto2-linux64:
name: Build Proto2 Linux 64
>>>>>>> Add Python ProtoBuf build
runs-on: ubuntu-18.04
steps:
- name: Checkout OSI
uses: actions/checkout@v2
with:
submodules: true
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> Add Python ProtoBuf build
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install Python Dependencies
run: python -m pip install --upgrade pip setuptools wheel pyyaml
<<<<<<< HEAD
- name: Install Doxygen
run: sudo apt-get install doxygen graphviz
=======
>>>>>>> Add Python ProtoBuf build
- name: Cache Dependencies
id: cache-depends
uses: actions/cache@v2
with:
path: protobuf-3.15.8
key: ${{ runner.os }}-v1-depends
- name: Download ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protobuf-all-3.15.8.tar.gz && tar xzvf protobuf-all-3.15.8.tar.gz
- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.15.8
run: ./configure DIST_LANG=cpp --prefix=/usr && make
- name: Install ProtoBuf
working-directory: protobuf-3.15.8
run: sudo make install && sudo ldconfig
- name: Install proto2cpp
run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git
- name: Prepare C++ Build
run: mkdir build
# Versioning
- name: Get versioning
id: get_version
run: echo ::set-output name=VERSION::$(git describe --always)
- name: Prepare Documentation Build
run: |
sed -i 's/PROJECT_NUMBER\s*= @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@/PROJECT_NUMBER = master (${{ steps.get_version.outputs.VERSION }})/g' doxygen_config.cmake.in
echo "EXCLUDE_PATTERNS = */osi3/* */protobuf-3.15.8/* */proto2cpp/*" >> doxygen_config.cmake.in
echo "GENERATE_TREEVIEW = YES" >> doxygen_config.cmake.in
- name: Configure C++ Build
working-directory: build
run: cmake -D FILTER_PROTO2CPP_PY_PATH=$GITHUB_WORKSPACE/proto2cpp ..
- name: Build C++
working-directory: build
run: cmake --build . --config Release -j 4
- name: Build Python
run: python setup.py build && python setup.py sdist
- name: Install Python
run: python -m pip install .
- name: Run Python Tests
run: python -m unittest discover tests
- name: Archive Documentation
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v2
with:
name: linux64-doc
path: doc/html
if-no-files-found: error
- name: deploy to gh-pages if push to master branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/html
build-proto3-linux64:
name: Build Proto3 Linux 64
runs-on: ubuntu-18.04
steps:
- name: Checkout OSI
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install Python Dependencies
run: python -m pip install --upgrade pip setuptools wheel pyyaml
=======
>>>>>>> Initial GitHub Actions CPP ProtoBuf Build
- name: Cache Dependencies
id: cache-depends
uses: actions/cache@v2
with:
<<<<<<< HEAD
path: protobuf-3.15.8
=======
path: protobuf-3.11.3
>>>>>>> Initial GitHub Actions CPP ProtoBuf Build
key: ${{ runner.os }}-v1-depends
- name: Download ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
<<<<<<< HEAD
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protobuf-all-3.15.8.tar.gz && tar xzvf protobuf-all-3.15.8.tar.gz
- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.15.8
run: ./configure DIST_LANG=cpp --prefix=/usr && make
- name: Install ProtoBuf
working-directory: protobuf-3.15.8
run: sudo make install && sudo ldconfig
- name: Prepare C++ Build
run: mkdir build
- name: Switch to Proto3 Syntax
run: |
bash convert-to-proto3.sh
rm *.pb2
- name: Configure C++ Build
working-directory: build
run: cmake ..
- name: Build C++
working-directory: build
run: cmake --build . --config Release -j 4
- name: Build Python
run: python setup.py build && python setup.py sdist
- name: Install Python
run: python -m pip install .
- name: Run Python Tests
run: python -m unittest discover tests
=======
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
- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.11.3
run: ./configure DIST_LANG=cpp --prefix=/usr && make
- name: Install ProtoBuf
working-directory: protobuf-3.11.3
run: sudo make install && sudo ldconfig
- name: Prepare C++ Build
run: mkdir build
- name: Configure C++ Build
working-directory: build
run: cmake ..
- name: Build C++
working-directory: build
run: cmake --build . --config Release -j 4
<<<<<<< HEAD
>>>>>>> Initial GitHub Actions CPP ProtoBuf Build
=======
- name: Build Python
run: python setup.py build && python setup.py sdist
- name: Install Python
run: python -m pip install .
- name: Run Python Tests
run: python -m unittest discover tests
>>>>>>> Add Python ProtoBuf build