-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.3 KB
/
linux.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
name: linux
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- name: Enable core dumps
run: ulimit -c unlimited
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
apt update
apt install -y build-essential g++ make cmake pkg-config git wget curl zip unzip tar gdb
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git /opt/vcpkg
/opt/vcpkg/bootstrap-vcpkg.sh
ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg
- name: Clone project repository
run: |
git clone https://github.com/leventkaragol/libcpp-channel.git /root/libcpp-channel
- name: Run cmake with vcpkg toolchain
run: |
cd /root/libcpp-channel
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build the project
run: |
cd /root/libcpp-channel
cmake --build build --config Release
- name: Run tests with gdb
run: |
cd /root/libcpp-channel
gdb -ex "run" -ex "bt" -ex "quit" --args ./build/test/test