Skip to content

Build osi-validation with different protobuf versions #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
39 changes: 29 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,18 @@ jobs:
matrix:
runs-on: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }}"
protobuf-version: ['2.6.1', '3.15.0', '3.20.1', '25.2']
include:
- protobuf-variant: '-all'
- abseil-version: '20230802.1'
- protobuf-use-autotools: true
- protobuf-variant: ''
protobuf-version: '2.6.1'
- protobuf-variant: ''
protobuf-version: '25.2'
protobuf-use-autotools: false

name: "Py: ${{ matrix.python-version }} - Proto: ${{ matrix.protobuf-version }} - ${{ matrix.runs-on }}"
runs-on: ${{ matrix.runs-on }}

steps:
Expand All @@ -59,20 +69,29 @@ jobs:
id: cache-depends
uses: actions/cache@v3
with:
path: protobuf-3.20.1
key: ${{ runner.os }}-v2-depends
path: protobuf-${{ matrix.protobuf-version }}
key: ${{ runner.os }}-${{ matrix.protobuf-version }}

- name: Download ProtoBuf
- name: Download ProtoBuf ${{ matrix.protobuf-version }}
if: steps.cache-depends.outputs.cache-hit != 'true'
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protobuf-all-3.20.1.tar.gz && tar xzvf protobuf-all-3.20.1.tar.gz
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{ matrix.protobuf-version }}/protobuf${{ matrix.protobuf-variant }}-${{ matrix.protobuf-version }}.tar.gz && tar xzvf protobuf${{ matrix.protobuf-variant }}-${{ matrix.protobuf-version }}.tar.gz

- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.20.1
- name: Download Abseil ${{ matrix.abseil-version }}
if: steps.cache-depends.outputs.cache-hit != 'true' && !matrix.protobuf-use-autotools
run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{matrix.abseil-version}}.tar.gz && tar xzvf ${{matrix.abseil-version}}.tar.gz && rm -rf protobuf-${{matrix.protobuf-version}}/third_party/abseil-cpp && mv abseil-cpp-${{matrix.abseil-version}} protobuf-${{matrix.protobuf-version}}/third_party/abseil-cpp

- name: Build ProtoBuf ${{ matrix.protobuf-version }} via autotools
if: steps.cache-depends.outputs.cache-hit != 'true' && matrix.protobuf-use-autotools
working-directory: protobuf-${{ matrix.protobuf-version }}
run: ./configure DIST_LANG=cpp --prefix=/usr && make

- name: Build ProtoBuf ${{ matrix.protobuf-version }} via cmake
if: steps.cache-depends.outputs.cache-hit != 'true' && !matrix.protobuf-use-autotools
working-directory: protobuf-${{ matrix.protobuf-version }}
run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4

- name: Install ProtoBuf
working-directory: protobuf-3.20.1
working-directory: protobuf-${{ matrix.protobuf-version }}
run: sudo make install && sudo ldconfig

- name: Install Open Simulation Interface
Expand Down