-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.65 KB
/
Test, Build and Test-main.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test, Build and Test - MAIN
on:
push:
branches:
- main
jobs:
Testing_Code_Quality:
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
#instalando dependencias das libraries
- name: Installing Dependencies
run: |
sudo apt-get update && sudo apt-get install build-essential
sudo apt install cmake -y
sudo apt install clang-15 clang-tidy-15 clang-format ninja-build -y
sudo add-apt-repository ppa:pistache+team/unstable && sudo apt update && sudo apt install libpistache-dev
sudo apt-get update && sudo apt-get install libcurl4 libcurl4-openssl-dev libpoco-dev libmysqlcppconn-dev -y
sudo apt install libgtest-dev googletest -y
sudo apt install redis-server redis-tools -y
sudo sed -i 's/^supervised no/supervised systemd/g' /etc/redis/redis.conf
sudo systemctl restart redis-server
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.x'
- name: Build project
run: |
export CC=$(which clang-15)
export CXX=$(which clang++-15)
export CURRENT_SOURCE_DIR=$(pwd)
mkdir build && cd build
export CURRENT_BUILD_DIR=$(pwd)
cmake .. -G Ninja
cmake --build . --config Debug --target all -j $(nproc) --
- name: Test project
run: |
export CC=$(which clang-15)
export CXX=$(which clang++-15)
cd build
ctest -j 20 -C Debug -T test --output-on-failure