-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github action base on Ubuntu 24.04
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |