Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ runs:
mvn package -DskipTests -Plinux-aarch32
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
mvn package -DskipTests -Plinux-aarch64
elif [ "${{ inputs.platform-name }}" == "windows_arm64" ]; then
mvn package -DskipTests -Pwindows-aarch64
else
mvn package -DskipTests
fi
shell: bash

- name: Test
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' }}
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' && inputs.platform-name != 'windows_arm64' }}
run: mvn -B jar:jar surefire:test
shell: bash

Expand All @@ -76,6 +78,8 @@ runs:
mvn deploy -DskipTests -Plinux-aarch32
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
mvn deploy -DskipTests -Plinux-aarch64
elif [ "${{ inputs.platform-name }}" == "windows_arm64" ]; then
mvn deploy -DskipTests -Pwindows-aarch64
else
mvn deploy -DskipTests
fi
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ runs:
mvn package -DskipTests -Plinux-aarch32
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
mvn package -DskipTests -Plinux-aarch64
elif [ "${{ inputs.platform-name }}" == "windows_arm64" ]; then
mvn package -DskipTests -Pwindows-aarch64
else
mvn package -DskipTests
fi
shell: bash

- name: Test
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' }}
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' && inputs.platform-name != 'windows_arm64' }}
run: mvn -B jar:jar surefire:test
shell: bash

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
platform:
- name: windows_x86_64
runs-on: windows-2022
- name: windows_arm64
runs-on: windows-2022
java: [17]
runs-on: ${{ matrix.platform.runs-on }}
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ jobs:
platform:
- name: windows_x86_64
runs-on: windows-2022
- name: windows_arm64
runs-on: windows-2022
java: [17]
runs-on: ${{ matrix.platform.runs-on }}
steps:
Expand Down Expand Up @@ -314,7 +316,7 @@ jobs:
version="${{ steps.release-version.outputs.version }}"
status=0

for classifier in windows-x86_64 linux-x86_64 linux-aarch64 \
for classifier in windows-x86_64 windows-aarch64 linux-x86_64 linux-aarch64 \
linux-aarch32 macos-x86_64 macos-aarch64; do
if [ ! -f "natives/webrtc-java-$version-$classifier.jar" ]; then
echo "::error::Missing native library jar for $classifier"
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ If you encounter issues loading the native library "webrtc-java", you can declar

Complete list of available classifiers:
- windows-x86_64
- windows-aarch64
- macos-x86_64
- macos-aarch64
- linux-x86_64
Expand Down Expand Up @@ -93,6 +94,7 @@ For specific platforms, add the appropriate classifier:

```groovy
implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "{{ VERSION }}", classifier: "windows-x86_64"
implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "{{ VERSION }}", classifier: "windows-aarch64"
implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "{{ VERSION }}", classifier: "macos-x86_64"
implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "{{ VERSION }}", classifier: "macos-aarch64"
implementation group: "dev.onvoid.webrtc", name: "webrtc-java", version: "{{ VERSION }}", classifier: "linux-x86_64"
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@
<platform.module>webrtc.windows.x86_64</platform.module>
</properties>
</profile>
<profile>
<id>windows-aarch64</id>
<properties>
<platform.classifier>windows-aarch64</platform.classifier>
<platform.module>webrtc.windows.aarch64</platform.module>
</properties>
</profile>
<profile>
<id>linux-x86_64</id>
<activation>
Expand Down
8 changes: 8 additions & 0 deletions webrtc-jni/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,13 @@
<cmake.toolchain.file>toolchain/x86_64-macos-cross.cmake</cmake.toolchain.file>
</properties>
</profile>
<profile>
<id>windows-aarch64</id>
<properties>
<cmake.options>-AARM64</cmake.options>
<cmake.config>${cmake.build.type}</cmake.config>
<cmake.toolchain.file>toolchain/aarch64-windows-clang.cmake</cmake.toolchain.file>
</properties>
</profile>
</profiles>
</project>
9 changes: 8 additions & 1 deletion webrtc-jni/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ list(APPEND SOURCES
add_library(${PROJECT_NAME} SHARED ${SOURCES})

# Introduced since WebRTC branch 7204 and Clang 20.
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-nullability-completeness)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(MSVC)
# clang-cl on Windows requires the /clang: prefix to avoid interpreting /W... as a warning level flag
target_compile_options(${PROJECT_NAME} PRIVATE /clang:-Wno-nullability-completeness)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-nullability-completeness)
endif()
endif()

target_include_directories(${PROJECT_NAME}
PRIVATE
Expand Down
5 changes: 5 additions & 0 deletions webrtc-jni/src/main/cpp/toolchain/aarch64-windows-clang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(TARGET_CPU "arm64")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT /EHsc -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE")
4 changes: 4 additions & 0 deletions webrtc-jni/src/main/cpp/toolchain/x86_64-windows-clang.cmake
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(TARGET_CPU "x64")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT /EHsc -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE")
5 changes: 5 additions & 0 deletions webrtc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
<type>jar</type>
<classifier>windows-x86_64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.name}-${project.version}-windows-aarch64.jar</file>
<type>jar</type>
<classifier>windows-aarch64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.name}-${project.version}-linux-x86_64.jar</file>
<type>jar</type>
Expand Down
Loading