-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.48 KB
/
buildandtest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build and Test
on:
push:
paths-ignore:
- 'docs**'
pull_request:
jobs:
build-ubuntu:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure git
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: git config --global url."https://${TOKEN}:[email protected]/".insteadOf "https://github.com/"
- name: "Install dependencies"
run: sudo apt-get clean && sudo apt-get update && sudo apt-get install build-essential cmake qtbase5-dev qt5-qmake libprotobuf-dev protobuf-compiler libprotoc-dev protobuf-compiler-grpc libgrpc++-dev libgrpc-dev libqt5serialport5-dev google-mock libgmock-dev libgtest-dev libspdlog-dev libfmt-dev
- name: "Install Google Test library"
run: cd /usr/src/googletest/googletest/ && sudo cmake CMakeLists.txt && sudo make && cd lib && sudo cp *.a /usr/lib
- name: "Install Google Mock library"
run: cd /usr/src/googletest/googlemock/ && sudo cmake CMakeLists.txt && sudo make && cd lib && sudo cp *.a /usr/lib
- name: "Update ldconfig"
run: sudo ldconfig
- name: "Install Armorial library"
run: sudo sh install.sh
- name: "Run tests"
run: sudo sh run_tests.sh