Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions .github/workflows/protobuf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: ProtoBuf CI Builds

on:
push:
pull_request:
branches: [ master ]

jobs:
build-proto2-linux64:
name: Build Proto2 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

- name: Install Doxygen
run: sudo apt-get install doxygen graphviz

- 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

- name: Prepare Documentation Bukd
run: |
sed -i 's/@VERSION_PATCH@/@VERSION_PATCH@_GitHub_MasterBranch/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

- 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: 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
161 changes: 0 additions & 161 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Open Simulation Interface (OSI)
===============================

[![Travis Build Status](https://travis-ci.com/OpenSimulationInterface/open-simulation-interface.svg?branch=master)](https://travis-ci.com/OpenSimulationInterface/open-simulation-interface)
[![ProtoBuf CI Builds](https://github.com/OpenSimulationInterface/open-simulation-interface/actions/workflows/protobuf.yml/badge.svg)](https://github.com/OpenSimulationInterface/open-simulation-interface/actions/workflows/protobuf.yml)

The Open Simulation Interface <sup>[[1]](https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/)</sup> (OSI) is a generic interface based on [Google's protocol buffers](https://developers.google.com/protocol-buffers/) for the environmental perception of automated driving functions in virtual scenarios.

Expand Down