Skip to content

Apply suggestions from code review #204

Apply suggestions from code review

Apply suggestions from code review #204

Workflow file for this run

name: ProtoBuf CI Builds
on:
push:
branches:
- '**'
paths-ignore: [ .github/**, .gitmodules ]
tags-ignore:
- '**'
pull_request:
branches: [ master ]
repository_dispatch:
types: [examples-build]
# this is a test
jobs:
build-osmp-examples:
name: Build OSMP examples
runs-on: ubuntu-22.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'
# cache dependencies
- name: Cache Dependencies
id: cache-depends
uses: actions/cache@v3
with:
path: protobuf-3.15.8
key: ${{ runner.os }}-v2-depends
# Download and build protobuf
- 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
# prepare build
- name: Prepare C++ Build
working-directory: examples
run: mkdir build
- name: cmake prepare
working-directory: examples/build
run: cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
- name: Build C++
working-directory: examples/build
run: cmake --build .
- name: Upload build artifacts
uses: actions/[email protected]
with:
name: Examples
path: examples/build
update_interface_release:
name: Update OSI release
runs-on: ubuntu-22.04
needs: [build-osmp-examples]
if: ${{ github.event.client_payload }}
steps:
- name: Collect previous artifacts
uses: actions/[email protected]
with:
name: Examples
path: examples/build
- name: Zip artifacts
uses: TheDoctor0/[email protected]
with:
filename: Examples.zip
path: examples/build
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.MACHINE_USER_PAT }}
file: Examples.zip
tag: ${{ github.event.client_payload.tag }}
repo_name: ${{ github.event.client_payload.source_repo }}