Implement mediacopier cli tool #204
Workflow file for this run
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
name: build-and-test | |
on: ["push", "pull_request"] | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
config: | |
- {name: "Ubuntu 22.04 (GCC)", os: "ubuntu-22.04", CC: "gcc", CXX: "g++"} | |
- {name: "Ubuntu 22.04 (Clang)", os: "ubuntu-22.04", CC: "clang", CXX: "clang++"} | |
name: ${{matrix.config.name}} | |
runs-on: ${{matrix.config.os}} | |
steps: | |
- name: Install dependencies | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
run: sudo apt-get update && sudo apt-get install -y build-essential cmake ffmpeg imagemagick lcov libavformat-dev libexiv2-dev libgtest-dev libimage-exiftool-perl libjpeg-turbo-progs librange-v3-dev libspdlog-dev libturbojpeg0-dev pkg-config qtbase5-dev qttools5-dev | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build and test | |
env: | |
CC: ${{matrix.config.CC}} | |
CXX: ${{matrix.config.CXX}} | |
BUILD_DIR: "build/" | |
run: | | |
cmake -B ${BUILD_DIR} -DENABLE_TEST=ON | |
MAKEFLAGS=-j$(nproc) cmake --build ${BUILD_DIR} | |
ctest --test-dir ${BUILD_DIR} -V | |
- name: Generate coverage report | |
env: | |
CC: ${{matrix.config.CC}} | |
CXX: ${{matrix.config.CXX}} | |
BUILD_DIR: "build-coverage/" | |
run: | | |
cmake -B ${BUILD_DIR} -DENABLE_TEST_COVERAGE=ON | |
MAKEFLAGS=-j$(nproc) cmake --build ${BUILD_DIR} | |
cmake --build ${BUILD_DIR} --target coverage | |
if: matrix.config.CC == 'gcc' | |
- name: Publish coverage report | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
path-to-lcov: build-coverage/coverage/trace.info | |
if: matrix.config.CC == 'gcc' |