-
Notifications
You must be signed in to change notification settings - Fork 129
88 lines (68 loc) · 2.24 KB
/
protobuf.yml
File metadata and controls
88 lines (68 loc) · 2.24 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
name: OSI CI Builds
on:
push:
pull_request:
branches: [ master ]
jobs:
spellcheck:
name: Spellcheck
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: rojopolis/spellcheck-github-actions@0.36.0
name: Spellcheck
with:
config_path: .github/.pyspelling.yml
run-tests:
name: Run tests
runs-on: ubuntu-24.04
steps:
- name: Checkout OSI
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_tests.txt
- name: Run Python Tests
run: python -m unittest discover tests
build-docs:
name: Build docs
runs-on: ubuntu-24.04
steps:
- name: Checkout OSI
uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get install doxygen graphviz
- name: Install proto2cpp
run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git
- name: Prepare Build
run: mkdir build
- name: Add Development Version Suffix
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
echo "VERSION_SUFFIX = .dev`date -u '+%Y%m%d%H%M%S'`" >> VERSION
- name: Get git Version
id: get_version
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- 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-*/* */proto2cpp/* */flatbuffers/*" >> doxygen_config.cmake.in
echo "GENERATE_TREEVIEW = YES" >> doxygen_config.cmake.in
- name: Configure Build
working-directory: build
run: cmake -D FILTER_PROTO2CPP_PY_PATH=$GITHUB_WORKSPACE/proto2cpp ..
- name: Build
working-directory: build
run: cmake --build . --config Release -j 4
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: doxygen-doc
path: |
doc/html/
doc/images/