-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.54 KB
/
build-and-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
name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-and-test:
runs-on: ubuntu-24.04
env:
CC: gcc-14
CXX: g++-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libgmock-dev libpugixml-dev libcairo-dev pango1.0 \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
cmake --version
$CC --version
$CXX --version
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
- name: Build binary
run: cmake --build ${{github.workspace}}/build --target vgraph
- name: Binary can be started
working-directory: ${{github.workspace}}/build
run: ./vgraph -h
- name: Build unit tests
run: cmake --build ${{github.workspace}}/build --target vgraph_test
- name: Run unit tests
working-directory: ${{github.workspace}}/build
run: ./vgraph_test