Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
8db9a7d
Remove video and audio components from library
Kas-tle Dec 7, 2025
52da479
Remove audio refs in JNI_PeerConnectionFactory
Kas-tle Dec 7, 2025
064e373
Remove more audio refs
Kas-tle Dec 7, 2025
ce16dab
Remove media and desktop pkg refs from WebRTCContext
Kas-tle Dec 7, 2025
36f0802
Fix macos arm and windows compile; Fix PeerConnectionFactory construct
Kas-tle Dec 7, 2025
b14b05c
Fix macos compile and webrtc-examples module-info
Kas-tle Dec 7, 2025
01f5895
Add more compile flags
Kas-tle Dec 7, 2025
faf6301
Add header for JNI_PeerConnectionFactory#initialize
Kas-tle Dec 7, 2025
a332c61
Try creating dummy audio
Kas-tle Dec 7, 2025
2f28763
Imports
Kas-tle Dec 7, 2025
269ecab
Import
Kas-tle Dec 7, 2025
5b73bf1
Imports
Kas-tle Dec 7, 2025
81570e7
Try CreateModularPeerConnectionFactory
Kas-tle Dec 7, 2025
cd56869
Modify webrtc comp args
Kas-tle Dec 8, 2025
df4d840
Decrease chance of test hang
Kas-tle Dec 8, 2025
515a02f
Fix missing time import for test
Kas-tle Dec 8, 2025
2822ae2
Wait until RTCIceGatheringState.COMPLETE instead of connect
Kas-tle Dec 8, 2025
fb3d89d
Further slim webrtc build
Kas-tle Dec 8, 2025
2736c0a
Force disable desktop capture on mac and windows
Kas-tle Dec 8, 2025
271b389
Fix desktop capture patch
Kas-tle Dec 8, 2025
7d8075e
Ignore whitespace in patch application
Kas-tle Dec 8, 2025
2bb48f0
Attempt build optimizations
Kas-tle Dec 8, 2025
23618ad
Attempt to further optimize gclient sync
Kas-tle Dec 8, 2025
a7de53c
Swutch back to patching deps file
Kas-tle Dec 8, 2025
fc49076
Use no history on final gclient sync
Kas-tle Dec 8, 2025
dea8fd0
Fix windows compile
Kas-tle Dec 8, 2025
9c568ca
Further compiler optimizations
Kas-tle Dec 9, 2025
93072f6
Fix pipeline
Kas-tle Dec 9, 2025
1e51266
Don't strip symbols
Kas-tle Dec 9, 2025
93f22b4
Don't disable metrics
Kas-tle Dec 9, 2025
f890c87
Try to fix build
Kas-tle Dec 9, 2025
57e3fc1
Test with is_official_build opts
Kas-tle Dec 9, 2025
31b9a70
More compiler opts
Kas-tle Dec 9, 2025
c2d123a
Make local compile more straightforward
Kas-tle Dec 15, 2025
a8c6e72
Fix compile
Kas-tle Dec 16, 2025
e14c297
Initial gradle setup
Kas-tle Dec 17, 2025
dd9eb1a
Switch to execute for gradle and add wrapper
Kas-tle Dec 22, 2025
1cb1be2
Remove unused imports
Kas-tle Dec 24, 2025
1896d49
Package renaming
Kas-tle Dec 24, 2025
cc6bd72
Remove unused java.desktop module require
Kas-tle Dec 24, 2025
590924c
Remove unused c++ includes
Kas-tle Dec 24, 2025
946db19
Modify gradle build
Kas-tle Dec 25, 2025
971ffee
New build system
Kas-tle Dec 25, 2025
082cc8e
Supply java distribution
Kas-tle Dec 25, 2025
e7a7dc3
Log toolchain
Kas-tle Dec 25, 2025
ddc2f5e
Pass correct toolchain names
Kas-tle Dec 25, 2025
1079023
Correct prepare-linux action
Kas-tle Dec 25, 2025
021ff1a
Use arm runners
Kas-tle Dec 26, 2025
ff2d0b2
Use native clang
Kas-tle Dec 26, 2025
d61e184
Put webrtc back in home folder because windows can't have long filena…
Kas-tle Dec 26, 2025
bb0c888
Shorter path
Kas-tle Dec 26, 2025
645ae2f
Skip tests on arm platforms
Kas-tle Dec 26, 2025
e7742c8
Fix windows compile and use rosetta for macos intel build
Kas-tle Dec 26, 2025
38ac2c5
Hopefully fix env
Kas-tle Dec 26, 2025
3e0e26b
Don't use arch for macos compile
Kas-tle Dec 26, 2025
ed8b82c
Add windows arm comp
Kas-tle Dec 26, 2025
6012b53
Skip tests on arm windows
Kas-tle Dec 26, 2025
c6d3d95
Fix windows compile
Kas-tle Dec 26, 2025
6c8ca3e
Decouple tests
Kas-tle Dec 26, 2025
fa37898
Fix test matricies
Kas-tle Dec 26, 2025
648cf3e
Attempt to fix tests
Kas-tle Dec 26, 2025
362bb2e
Provide full path for test artifacts
Kas-tle Dec 26, 2025
bd823ac
Use full path
Kas-tle Dec 26, 2025
99c3a5b
Try shell bash for actions/cache
Kas-tle Dec 26, 2025
f5bded1
Downgrade cache action...
Kas-tle Dec 26, 2025
92dc987
Use full path (actually)
Kas-tle Dec 26, 2025
a9d7c25
Only do webrtc test task
Kas-tle Dec 26, 2025
65ce210
Try arm32 tests
Kas-tle Dec 26, 2025
a72424f
try to debug 32 bit linux
Kas-tle Dec 26, 2025
4de1aef
More 32-bit changes
Kas-tle Dec 26, 2025
f648ea0
More arm32 test changes
Kas-tle Dec 26, 2025
34087bb
Try cache with tilde
Kas-tle Dec 26, 2025
a25aa79
Update publishing and README
Kas-tle Dec 27, 2025
9dce121
Update native publishing inclusion
Kas-tle Dec 27, 2025
95a5e61
Add foojay-resolver-convention for jdk toolchain download
Kas-tle Dec 27, 2025
1a3aa08
Modify action layout
Kas-tle Dec 27, 2025
630e12d
Fix paths
Kas-tle Dec 27, 2025
de08213
Store checkout action elsewhere
Kas-tle Dec 27, 2025
d1722c6
Name steps
Kas-tle Dec 27, 2025
86397f4
Build should be faster
Kas-tle Dec 28, 2025
e6b9961
Restructure build and webrtc cache
Kas-tle Dec 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 0 additions & 76 deletions .github/actions/build-macos-x86_64/action.yml

This file was deleted.

117 changes: 49 additions & 68 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,71 @@
name: 'Maven Build'
name: "Gradle Build"

description: 'Build the platform dependent Java library'
description: "Build the platform dependent Java library"

inputs:
java-version:
description: 'The Java build version.'
required: true
default: '17'

platform-name:
description: 'The target platform.'
description: "The target platform."
required: true

maven-username:
description: 'The Maven username.'
required: true

maven-password:
description: 'The Maven password.'
platform-arch:
description: "The target platform architecture."
required: true

runs:
using: "composite"
steps:
- name: Set up WebRTC cache
uses: actions/cache@v4
with:
path: ~/${{ env.WEBRTC_INSTALL_FOLDER }}
key: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-${{ hashFiles('webrtc-jni/pom.xml') }}
restore-keys: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-

- name: Set up Maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-${{ inputs.platform-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-${{ inputs.platform-name }}-
- name: Create WebRTC checkout folder
run: |
mkdir -p ~/webrtc/build
echo "WEBRTC_CHECKOUT_FOLDER=~/webrtc" >> $GITHUB_ENV
shell: bash

- name: Set up JDK ${{ inputs.java-version }}
uses: actions/setup-java@v5
- name: Restore WebRTC cache
uses: actions/cache/restore@6f8efc29b200d32929f49075959781ed54ec270c
# https://github.com/actions/cache/releases/latest
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
path: ${{ env.WEBRTC_CHECKOUT_FOLDER }}/build
key: >-
webrtc-${{ hashFiles('webrtc-jni/gradle.properties') }}-${{ inputs.platform-name }}-${{ inputs.platform-arch }}-${{
hashFiles(
'webrtc-jni/src/main/cpp/CMakeLists.txt',
'webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt',
format('webrtc-jni/src/main/cpp/dependencies/webrtc/patches/{0}/*.patch', inputs.platform-name),
format('webrtc-jni/src/main/cpp/toolchain/{0}-{1}.cmake', inputs.platform-name, inputs.platform-arch)
)
}}

- name: Build
run: |
if [ "${{ inputs.platform-name }}" == "linux_arm" ]; then
mvn package -DskipTests -Plinux-aarch32
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
mvn package -DskipTests -Plinux-aarch64
else
mvn package -DskipTests
fi
shell: bash

- name: Test
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' }}
run: mvn -B jar:jar surefire:test
env:
WEBRTC_PLATFORM: ${{ inputs.platform-name }}-${{ inputs.platform-arch }}
run: ./gradlew build -x test
shell: bash

- name: Archive webrtc-java
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
# https://github.com/actions/upload-artifact/releases/latest
with:
name: webrtc-java-${{ inputs.platform-name }}
path: webrtc/target/*.jar
name: webrtc-java-${{ inputs.platform-name }}-${{ inputs.platform-arch }}
path: webrtc/build/libs/*.jar

- name: Archive webrtc-java-jni
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
# https://github.com/actions/upload-artifact/releases/latest
with:
name: webrtc-java-jni-${{ inputs.platform-name }}
path: webrtc-jni/target/*.jar
name: webrtc-java-jni-${{ inputs.platform-name }}-${{ inputs.platform-arch }}
path: webrtc-jni/build/libs/*.jar

- name: Deploy
if: ${{ github.event_name != 'pull_request' && github.repository == 'devopvoid/webrtc-java' }}
env:
MAVEN_USERNAME: ${{ inputs.maven-username }}
MAVEN_TOKEN: ${{ inputs.maven-password }}
run: |
if [ "${{ inputs.platform-name }}" == "linux_arm" ]; then
mvn deploy -DskipTests -Plinux-aarch32
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
mvn deploy -DskipTests -Plinux-aarch64
else
mvn deploy -DskipTests
fi
shell: bash
- name: Save WebRTC cache
uses: actions/cache/save@6f8efc29b200d32929f49075959781ed54ec270c
# https://github.com/actions/cache/releases/latest
if: ${{ github.event_name != 'pull_request' }}
with:
path: ${{ env.WEBRTC_CHECKOUT_FOLDER }}/build
key: >-
webrtc-${{ hashFiles('webrtc-jni/gradle.properties') }}-${{ inputs.platform-name }}-${{ inputs.platform-arch }}-${{
hashFiles(
'webrtc-jni/src/main/cpp/CMakeLists.txt',
'webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt',
format('webrtc-jni/src/main/cpp/dependencies/webrtc/patches/{0}/*.patch', inputs.platform-name),
format('webrtc-jni/src/main/cpp/toolchain/{0}-{1}.cmake', inputs.platform-name, inputs.platform-arch)
)
}}
23 changes: 23 additions & 0 deletions .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Download Artifacts"

description: "Downloads the specified artifacts"

inputs:
name:
description: "The name of the artifact to download."
required: false
default: ""
path:
description: "The path to download the artifact to."
required: false
default: ""

runs:
using: "composite"
steps:
- name: Download Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
# https://github.com/actions/download-artifact/releases/latest
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
27 changes: 16 additions & 11 deletions .github/actions/prepare-linux/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: 'Prepare Linux Build'
name: "Prepare Linux Build"

description: 'Frees up disk space and installs required packages for Linux builds.'
description: "Frees up disk space and installs required packages for Linux builds."

inputs:
platform-arch:
description: "The target platform architecture."
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -31,7 +36,7 @@ runs:
- name: Install required packages
run: |
sudo apt update
sudo apt install -y binutils cmake git locales lsb-release ninja-build pipewire pipewire-pulse pkg-config python3 python3-setuptools rsync unzip wget xz-utils
sudo apt install -y binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils

# Chromium Clang to be used with the clang toolchain file
#curl -s https://raw.githubusercontent.com/chromium/chromium/main/tools/clang/scripts/update.py | python3 - --output-dir=/opt/clang
Expand All @@ -41,29 +46,29 @@ runs:
sudo tar -xvf clang-llvmorg-20-init-9764-gb81d8e90-72.tar.xz -C /opt/clang
shell: bash

- name: Install required packages for x86-64
if: matrix.platform.name == 'linux_x86-64'
- name: Install required packages for linux-x86_64
if: inputs.platform-arch == 'x86_64'
run: |
sudo mkdir /opt/sysroot
python3 webrtc-jni/src/main/cpp/dependencies/webrtc/linux/sysroot/install-sysroot.py --arch=amd64
sudo mv webrtc-jni/src/main/cpp/dependencies/webrtc/linux/debian* /opt/sysroot/
shell: bash

- name: Install required packages for arm
if: matrix.platform.name == 'linux_arm'
- name: Install required packages for linux-aarch32
if: inputs.platform-arch == 'aarch32'
run: |
sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

sudo mkdir /opt/sysroot
python3 webrtc-jni/src/main/cpp/dependencies/webrtc/linux/sysroot/install-sysroot.py --arch=armhf
sudo mv webrtc-jni/src/main/cpp/dependencies/webrtc/linux/debian* /opt/sysroot/
shell: bash

- name: Install required packages for arm64
if: matrix.platform.name == 'linux_arm64'
- name: Install required packages for linux-aarch64
if: inputs.platform-arch == 'aarch64'
run: |
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

sudo mkdir /opt/sysroot
python3 webrtc-jni/src/main/cpp/dependencies/webrtc/linux/sysroot/install-sysroot.py --arch=arm64
sudo mv webrtc-jni/src/main/cpp/dependencies/webrtc/linux/debian* /opt/sysroot/
Expand Down
8 changes: 3 additions & 5 deletions .github/actions/prepare-macos/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: 'Prepare macOS Build'
name: "Prepare macOS Build"

description: 'Installs required packages for macOS builds.'
description: "Installs required packages for macOS builds."

runs:
using: "composite"
steps:
- name: Install required packages
run: |
# Required on macos-14
brew install python-setuptools
run: brew install python-setuptools
shell: bash

- name: Select Xcode version
Expand Down
36 changes: 3 additions & 33 deletions .github/actions/prepare-windows/action.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
name: 'Prepare Windows Build'
name: "Prepare Windows Build"

description: 'Frees up disk space and installs required packages for Windows builds.'
description: "Installs required packages for Windows builds."

runs:
using: "composite"
steps:
- name: Set up Python 3.11
if: false
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Disk cleanup
if: false
run: |
Get-PSDrive
# Docker Images
docker rmi $(docker images -q -a)
# Android SDK
if ($Env:ANDROID_HOME) {
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
}
if ($Env:ANDROID_NDK_HOME) {
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
}
# JVM
if ($Env:JAVA_HOME_11_X64) {
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
}
if ($Env:JAVA_HOME_8_X64) {
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
}
Get-PSDrive
shell: powershell

- name: Install required packages
run: |
choco install ninja
run: choco install ninja
shell: powershell
14 changes: 14 additions & 0 deletions .github/actions/publish/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Gradle Publish"

description: "Publish the library to Maven Central"

runs:
using: "composite"
steps:
- uses: ./.github/actions/download-artifact
with:
path: native-staging

- name: Publish
run: ./gradlew publishAggregationToCentralPortal
shell: bash
Loading