Skip to content

Commit

Permalink
Add build test to CI, rename the new option
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankiesz committed Dec 20, 2024
1 parent 5d405c5 commit da078fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,22 @@ jobs:
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON
make
linux-build-gcc-static-deps-shared-kvssink:
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt clean && sudo apt update
sudo apt install -y libunwind-dev
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON -DBUILD_FORCE_KVSSINK_SHARED=ON
make
linux-build-gcc-shared:
runs-on: ubuntu-20.04
steps:
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include(GNUInstallDirs)
option(BUILD_GSTREAMER_PLUGIN "Build kvssink GStreamer plugin" OFF)
option(BUILD_JNI "Build C++ wrapper for JNI to expose the functionality to Java/Android" OFF)
option(BUILD_STATIC "Build with static linkage" OFF)
option(BUILD_FORCE_GSTREAMER_PLUGIN_SHARED "If building with static linkage, build the kvssink GStreamer plugin as a shared library" OFF)
option(BUILD_FORCE_KVSSINK_SHARED "If building with static linkage, build the kvssink GStreamer plugin as a shared library" OFF)
option(ADD_MUCLIBC "Add -muclibc c flag" OFF)
option(BUILD_DEPENDENCIES "Whether or not to build depending libraries from source" ON)
option(BUILD_OPENSSL_PLATFORM "If buildng OpenSSL what is the target platform" OFF)
Expand Down Expand Up @@ -59,7 +59,7 @@ add_definitions(-DCMAKE_DETECTED_CACERT_PATH)

# Instruct Producer C to build Curl with Position Independent Code (-fpic).
# This is to allow a static Curl build to link with to a shared Producer Cpp build.
if(BUILD_STATIC AND BUILD_FORCE_GSTREAMER_PLUGIN_SHARED)
if(BUILD_STATIC AND BUILD_FORCE_KVSSINK_SHARED)
set(CURL_POSITION_INDEPENDENT_CODE TRUE)
endif()

Expand Down Expand Up @@ -220,7 +220,7 @@ if(BUILD_GSTREAMER_PLUGIN)
include_directories(${GST_APP_INCLUDE_DIRS})
link_directories(${GST_APP_LIBRARY_DIRS})

if(BUILD_STATIC AND (NOT BUILD_FORCE_GSTREAMER_PLUGIN_SHARED))
if(BUILD_STATIC AND (NOT BUILD_FORCE_KVSSINK_SHARED))
add_library(gstkvssink STATIC ${GST_PLUGIN_SOURCE_FILES})
else()
add_library(gstkvssink MODULE ${GST_PLUGIN_SOURCE_FILES})
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can pass the following options to `cmake ..`.

* `-DBUILD_GSTREAMER_PLUGIN` -- Build kvssink GStreamer plugin. Default is OFF.
* `-DBUILD_STATIC` -- Build as static libraries. Default is OFF.
* `-BUILD_FORCE_GSTREAMER_PLUGIN_SHARED` -- If building with static linkage, build the kvssink GStreamer plugin as a shared library. Default is OFF.
* `-BUILD_FORCE_KVSSINK_SHARED` -- If building with static linkage, build the kvssink GStreamer plugin as a shared library. Default is OFF.
* `-DBUILD_JNI` -- Build C++ wrapper for JNI to expose the functionality to Java/Android
* `-DBUILD_DEPENDENCIES` -- Build depending libraries from source
* `-DBUILD_TEST=TRUE` -- Build unit/integration tests, may be useful for confirm support for your device. `./tst/producerTest`
Expand Down

0 comments on commit da078fc

Please sign in to comment.