Skip to content

GTests

GTests #89

Workflow file for this run

name: GTests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Restored cached build
id: cache-build-restore
uses: actions/cache/restore@v3
with:
path: .
key: ${{ runner.os }}-build
- name: Install dependecies
run: sudo apt-get install -y cmake g++ qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5charts5-dev libsdl2-dev libzmq3-dev libeigen3-dev libgtest-dev ninja-build
- name: Install Protobuf
if: steps.cache-build-restore.outputs.cache-hit != 'true'
run: git clone https://github.com/protocolbuffers/protobuf.git /opt/protobuf &&
cd /opt/protobuf &&
git checkout 3.19.x &&
git submodule update --init --recursive &&
./autogen.sh &&
./configure &&
make -j $(nproc) &&
make install &&
ldconfig &&
- name: Configure
if: steps.cache-build-restore.outputs.cache-hit != 'true'
run: mkdir build && cd build && cmake ..
- name: Build
run: cmake --build build --target roboteam_ai_tests -j $(nproc) &&
cmake --build build --target roboteam_utils_tests -j $(nproc) &&
cmake --build build --target roboteam_networking_tests -j $(nproc)
- name: Run
run: ./build/roboteam_ai/roboteam_ai_tests &&
./build/roboteam_networking/roboteam_networking_tests &&
./build/roboteam_utils/roboteam_utils_tests
- name: Save build
id: cache-build-save
uses: actions/cache/save@v3
with:
path: .
key: ${{ steps.cache-build-restore.outputs.cache-primary-key }}