-
Notifications
You must be signed in to change notification settings - Fork 261
68 lines (60 loc) · 2.02 KB
/
ci.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
63
64
65
66
67
name: libopenshot CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
CODECOV_TOKEN: 'dc94d508-39d3-4369-b1c6-321749f96f7c'
steps:
- uses: actions/checkout@v2
# Work around a codecov issue detecting commit SHAs
# see: https://community.codecov.io/t/issue-detecting-commit-sha-please-run-actions-checkout-with-fetch-depth-1-or-set-to-0/2571
with:
fetch-depth: 0
- uses: haya14busa/action-cond@v1
id: coverage
with:
cond: ${{ matrix.compiler == 'clang' }}
if_true: "-DENABLE_COVERAGE:BOOL=1"
if_false: "-DENABLE_COVERAGE:BOOL=0"
- name: Install dependencies
shell: bash
run: |
sudo add-apt-repository ppa:openshot.developers/libopenshot-daily
sudo apt update
sudo apt install \
cmake swig doxygen graphviz curl lcov \
libopenshot-audio-dev \
qtbase5-dev qtbase5-dev-tools \
libfdk-aac-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev \
libzmq3-dev libmagick++-dev libunittest++-dev \
libopencv-dev libprotobuf-dev protobuf-compiler
- name: Build libopenshot
shell: bash
run: |
mkdir build
pushd build
cmake -B . -S .. -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug" "${{ steps.coverage.outputs.value }}"
cmake --build . -- VERBOSE=1
popd
- name: Test libopenshot
shell: bash
run: |
pushd build
cmake --build . --target os_test -- VERBOSE=1
popd
- name: Install libopenshot
shell: bash
run: |
pushd build
cmake --build . --target install -- VERBOSE=1
popd
- uses: codecov/codecov-action@v1
if: ${{ matrix.compiler == 'clang' }}
with:
file: build/coverage.info