-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (52 loc) · 2.08 KB
/
ubuntu-2404-cmake.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
name: Ubuntu 24.04, CMake
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
BUILD_TYPE: RelWithDebInfo
DEBIAN_FRONTEND: noninteractive
jobs:
build:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
shell: bash
run: "sudo apt-get update && sudo apt-get -y install
cmake cmake-data build-essential libmagick++-dev qtbase5-dev qtmultimedia5-dev
ffmpeg git libv4l-dev libgphoto2-dev"
- name: Install patched vidstab
shell: bash
working-directory: /tmp
run: "git clone -b improvements https://github.com/Karry/vid.stab.git vidstab &&
cd vidstab &&
cmake . &&
make -j $(nproc) &&
sudo make install &&
sudo ldconfig"
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
# TODO: run tests with address sanitizer when vidstab will be fine: -DCMAKE_CXX_FLAGS=-fsanitize=address
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE --output-on-failure