Skip to content

Commit

Permalink
add github action base on Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Karry committed Aug 12, 2024
1 parent f2ad0b8 commit 010002c
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ubuntu-2404-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 010002c

Please sign in to comment.