diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6050a7..c1510a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: matrix: platform: - name: linux_x86-64 - runs-on: ubuntu-24.04 + runs-on: ubuntu-20.04 java: [17] runs-on: ${{ matrix.platform.runs-on }} steps: @@ -113,11 +113,12 @@ jobs: - name: Install required packages run: | sudo apt-get update - sudo apt-get install -y findutils libpulse-dev libasound2-dev libudev-dev libv4l-dev libx11-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils + sudo apt-get install -y pulseaudio libpulse-dev libasound2-dev libdbus-1-dev libudev-dev libv4l-dev libx11-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils # Required for testing - sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries - systemctl --user daemon-reload - systemctl --user --now enable pipewire{,-pulse}.{socket,service} + pulseaudio --start + #sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries + #systemctl --user daemon-reload + #systemctl --user --now enable pipewire{,-pulse}.{socket,service} - id: maven-build name: Maven build diff --git a/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt b/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt index b3954d3..c3f4c03 100644 --- a/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt +++ b/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt @@ -77,14 +77,10 @@ function(execute_command) print("${COMMAND_ERROR}") endfunction() -function(sysroot_install use_webrtc_root) +function(sysroot_install) message(STATUS "Installing sysroot") - if(${use_webrtc_root}) - set(SCRIPT_PATH ${WEBRTC_SRC_DIR}/src/build/linux/sysroot_scripts/install-sysroot.py) - else() - set(SCRIPT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux/sysroot/install-sysroot.py) - endif() + set(SCRIPT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux/sysroot/install-sysroot.py) execute_process( COMMAND ${Python3_EXECUTABLE} ${SCRIPT_PATH} --arch=${TARGET_CPU} @@ -97,14 +93,10 @@ function(sysroot_install use_webrtc_root) print("${COMMAND_ERROR}") endfunction() -function(sysroot_link use_webrtc_root) +function(sysroot_link) message(STATUS "Retrieving libm.so from sysroot") - if(${use_webrtc_root}) - set(SYSROOT_PATH ${WEBRTC_SRC_DIR}/src/build/linux) - else() - set(SYSROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux) - endif() + set(SYSROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux) execute_process( COMMAND find ${SYSROOT_PATH} -iname libm-*.so @@ -175,17 +167,13 @@ if(EXISTS "${WEBRTC_LIB_PATH}" OR EXISTS "${WEBRTC_LIB_PATH_INSTALLED}") message(STATUS "WebRTC: Compiled version found '${TARGET_LINK_LIB}'") if(LINUX) - sysroot_install(FALSE) - sysroot_link(FALSE) + sysroot_install() + sysroot_link() endif() return() endif() -if(LINUX) - sysroot_install(TRUE) -endif() - if(NOT EXISTS "${WEBRTC_SRC_DIR}/depot_tools") message(STATUS "WebRTC: fetch depot tools") file(MAKE_DIRECTORY ${WEBRTC_SRC_DIR}) @@ -221,6 +209,10 @@ execute_command( WORKING_DIRECTORY "${WEBRTC_DIR}" ) +if(LINUX) + sysroot_install() +endif() + file(GLOB PATCHES "${CMAKE_CURRENT_LIST_DIR}/patches/${SOURCE_TARGET}/*.patch") if (PATCHES) @@ -256,7 +248,7 @@ execute_command( ) if(LINUX) - sysroot_link(TRUE) + sysroot_link() endif() install(FILES "${WEBRTC_LIB_PATH}" DESTINATION "${WEBRTC_INSTALL_DIR}/lib")