Feature/interface to erforce simulator #201
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 update | |
sudo apt-get upgrade -y | |
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 ccache | |
- name: Build Protobuf | |
if: steps.cache-build-restore.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/protocolbuffers/protobuf.git protobuf | |
cd protobuf | |
git checkout 3.19.x | |
git submodule update --init --recursive | |
./autogen.sh | |
./autogen.sh | |
./configure | |
make | |
make check | |
- name: Install Protobuf | |
run: | | |
cd protobuf | |
sudo make install | |
sudo ldconfig | |
- name: Build tests | |
if: steps.cache-build-restore.outputs.cache-hit != 'true' | |
run: mkdir build && cd build && cmake .. | |
- name: Install tests | |
run: | | |
cmake --build build --target all -j $(nproc) | |
- name: Run | |
run: find ./build/debug/bin/ -type f -iname "*test*" -exec {} \; | |
- name: Save build | |
id: cache-build-save | |
uses: actions/cache/save@v3 | |
with: | |
path: . | |
key: ${{ steps.cache-build-restore.outputs.cache-primary-key }} |