You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #757 from ferdnyc/resvg-in-ci
Resvg: Add support for v0.11.0+, enable in GitHub CI
This commit is contained in:
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -45,6 +45,14 @@ jobs:
|
||||
repository: OpenShot/libopenshot-audio
|
||||
path: audio
|
||||
|
||||
- name: Checkout Resvg
|
||||
if: ${{ matrix.compiler.cc == 'clang' && runner.os == 'linux' }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: RazrFalcon/resvg
|
||||
path: resvg
|
||||
branch: v0.11.0
|
||||
|
||||
- uses: haya14busa/action-cond@v1
|
||||
id: generator
|
||||
with:
|
||||
@@ -58,6 +66,12 @@ jobs:
|
||||
cond: ${{ matrix.compiler.cc == 'gcc' && runner.os == 'linux' }}
|
||||
if_true: "-DENABLE_COVERAGE:BOOL=1"
|
||||
|
||||
- uses: haya14busa/action-cond@v1
|
||||
id: use-resvg
|
||||
with:
|
||||
cond: ${{ matrix.compiler.cc == 'clang' && runner.os == 'linux' }}
|
||||
if_true: "-DResvg_ROOT:PATH=./resvg"
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: ${{ runner.os == 'linux' }}
|
||||
run: |
|
||||
@@ -67,9 +81,11 @@ jobs:
|
||||
cmake swig doxygen graphviz curl lcov \
|
||||
libasound2-dev \
|
||||
qtbase5-dev qtbase5-dev-tools libqt5svg5-dev \
|
||||
libfdk-aac-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev \
|
||||
libfdk-aac-dev libavcodec-dev libavformat-dev \
|
||||
libavutil-dev libswscale-dev libswresample-dev \
|
||||
libzmq3-dev libmagick++-dev libbabl-dev \
|
||||
libopencv-dev libprotobuf-dev protobuf-compiler
|
||||
libopencv-dev libprotobuf-dev protobuf-compiler \
|
||||
cargo
|
||||
# Install catch2 package from Ubuntu 20.10, since for some reason
|
||||
# even 20.04 only has Catch 1.12.1 available.
|
||||
wget https://launchpad.net/ubuntu/+archive/primary/+files/catch2_2.13.0-1_all.deb
|
||||
@@ -107,13 +123,20 @@ jobs:
|
||||
mingw-w64-x86_64-swig
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: cache
|
||||
id: cache-audio
|
||||
with:
|
||||
path: audio/build
|
||||
key: audio-${{ runner.os }}-${{ matrix.compiler.cxx }}-${{ hashFiles('audio/CMakeLists.txt') }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ steps.use-resvg.outputs.value }}
|
||||
id: cache-resvg
|
||||
with:
|
||||
path: resvg/target
|
||||
key: resvg-${{ runner.os }}-${{ matrix.compiler.cxx }}-${{ hashFiles('resvg/Cargo.toml') }}
|
||||
|
||||
- name: Build OpenShotAudio (if not cached)
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
if: steps.cache-audio.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
pushd audio
|
||||
if [ ! -d build ]; then
|
||||
@@ -135,6 +158,15 @@ jobs:
|
||||
cmake --build build
|
||||
popd
|
||||
|
||||
- name: Build Resvg (if enabled and not cached)
|
||||
if: ${{ steps.use-resvg.outputs.value }} && (steps.cache-resvg.outputs.cache-hit != 'true')
|
||||
run: |
|
||||
if [ -d "resvg/c-api" ]; then
|
||||
pushd resvg/c-api
|
||||
cargo build --release
|
||||
popd
|
||||
fi
|
||||
|
||||
- name: Build libopenshot
|
||||
run: |
|
||||
if [ "_${{ runner.os }}" == "_macOS" ]; then
|
||||
@@ -161,7 +193,8 @@ jobs:
|
||||
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" \
|
||||
-DOpenShotAudio_ROOT="./audio/build" \
|
||||
${CMAKE_EXTRA} \
|
||||
"${{ steps.coverage.outputs.value }}"
|
||||
"${{ steps.coverage.outputs.value }}" \
|
||||
"${{ steps.use-resvg.outputs.value }}"
|
||||
cmake --build build -- VERBOSE=1
|
||||
|
||||
- name: Test libopenshot
|
||||
|
||||
Reference in New Issue
Block a user