diff --git a/.github/workflows/ubuntu-2404-cmake.yml b/.github/workflows/ubuntu-2404-cmake.yml new file mode 100644 index 0000000..75b4054 --- /dev/null +++ b/.github/workflows/ubuntu-2404-cmake.yml @@ -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 " + 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