-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (63 loc) · 1.63 KB
/
linux_test.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build TgBot++ (Linux)
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- cc: GCC
real_cc: gcc
real_cxx: g++
flags: -DENABLE_RUST_SUPPORT=ON
str: (Rust)
- cc: GCC
real_cc: gcc
real_cxx: g++
flags: ''
str: ''
- cc: Clang
real_cc: clang-18
real_cxx: clang++-18
flags: -DENABLE_RUST_SUPPORT=ON
str: (Rust)
- cc: Clang
real_cc: clang-18
real_cxx: clang++-18
flags: ''
str: ''
name: 🚧 ${{ matrix.cc }} ${{ matrix.str }}
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up dependencies
run: |
bash ./resources/scripts/setup_dependencies_apt.sh
- name: Install latest clang
if: matrix.cc == 'Clang'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
- name: '🚧 Build TgBot++'
env:
CC: ${{ matrix.real_cc }}
CXX: ${{ matrix.real_cxx }}
run: |
mkdir build
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Debug -DTGBOT_ENABLE_TESTING=ON ${{ matrix.flags }} .
cmake --build build -j4
- name: Run Tests
run: |
cd build
ctest --output-on-failure --timeout 30