Skip to content

Fix Android tools for m137 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
47 changes: 24 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,31 @@
# with:
# name: webrtc.${{ matrix.name }}.zip
# path: build\_package\${{ matrix.name }}\webrtc.zip
# build-macos:
# defaults:
# run:
# working-directory: ./build
# strategy:
# fail-fast: false
# matrix:
# name:
# - macos_arm64
# - macos_x86_64
# - ios
# runs-on: macos-11
# steps:
# - uses: actions/checkout@v4
# - name: Select Xcode 13.0
# run: sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer
# - run: brew install ninja
# - run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: webrtc.${{ matrix.name }}.tar.gz
# path: build/_package/${{ matrix.name }}/webrtc.tar.gz
build-apple:
defaults:
run:
working-directory: ./build
strategy:
fail-fast: false
matrix:
name:
- macos_arm64
- macos_x86_64
- ios
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4
- run: brew install ninja
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: webrtc.${{ matrix.name }}.tar.gz
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
build-linux:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
defaults:
run:
working-directory: ./build
Expand Down
23 changes: 12 additions & 11 deletions build/patches/fix_mocks.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
diff --git a/modules/audio_device/include/mock_audio_device.h b/modules/audio_device/include/mock_audio_device.h
index 8483aa3da8..f66cdca0ba 100644
index 191caf604f..f16b4d9c79 100644
--- a/modules/audio_device/include/mock_audio_device.h
+++ b/modules/audio_device/include/mock_audio_device.h
@@ -149,6 +149,7 @@ class MockAudioDeviceModule : public AudioDeviceModule {
(AudioParameters * params),
(const, override));
#endif // WEBRTC_IOS
@@ -138,6 +138,8 @@ class MockAudioDeviceModule : public AudioDeviceModule {
MOCK_METHOD(int32_t, EnableBuiltInAGC, (bool enable), (override));
MOCK_METHOD(int32_t, EnableBuiltInNS, (bool enable), (override));
MOCK_METHOD(int32_t, GetPlayoutUnderrunCount, (), (const, override));
+ MOCK_METHOD(std::optional<Stats>, GetStats, (), (const, override));
+ MOCK_METHOD(int32_t, SetAudioDeviceSink, (AudioDeviceSink* sink), (const, override));
};
} // namespace test
} // namespace webrtc
#if defined(WEBRTC_IOS)
MOCK_METHOD(int,
GetPlayoutAudioParameters,
diff --git a/pc/test/fake_audio_capture_module.h b/pc/test/fake_audio_capture_module.h
index c04373cdfd..ab6ff3492a 100644
index b5b1574818..084d02caed 100644
--- a/pc/test/fake_audio_capture_module.h
+++ b/pc/test/fake_audio_capture_module.h
@@ -137,6 +137,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule {
@@ -135,6 +135,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule {

int32_t GetPlayoutUnderrunCount() const override { return -1; }

+ int32_t SetAudioDeviceSink(webrtc::AudioDeviceSink* sink) const override { return 0; }
+
absl::optional<webrtc::AudioDeviceModule::Stats> GetStats() const override {
std::optional<webrtc::AudioDeviceModule::Stats> GetStats() const override {
return webrtc::AudioDeviceModule::Stats();
}
10 changes: 5 additions & 5 deletions build/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def init_rootfs(sysroot: str, config: MultistrapConfig, force=False):
'api/task_queue:default_task_queue_factory',
'sdk:native_api',
'sdk:default_codec_factory_objc',
'pc:peerconnection',
'pc:peer_connection',
'sdk:videocapture_objc',
]
WEBRTC_BUILD_TARGETS = {
Expand Down Expand Up @@ -526,7 +526,7 @@ def build_webrtc_ios(
with cd(os.path.join(webrtc_src_dir, 'tools_webrtc', 'ios')):
ios_deployment_target = cmdcap(
['python3', '-c',
f'from build_ios_libs import IOS_DEPLOYMENT_TARGET; print(IOS_DEPLOYMENT_TARGET["{device}"])'])
f'from build_ios_libs import IOS_MINIMUM_DEPLOYMENT_TARGET; print(IOS_MINIMUM_DEPLOYMENT_TARGET["{device}"])'])

if not os.path.exists(os.path.join(work_dir, 'args.gn')) or gen or overlap_build_dir:
gn_args = [
Expand All @@ -543,7 +543,7 @@ def build_webrtc_ios(
]
gn_gen(webrtc_src_dir, work_dir, gn_args, extra_gn_args)
if not nobuild:
cmd(['ninja', '-C', work_dir, *get_build_targets('ios')])
cmd(['autoninja', '-C', work_dir, *get_build_targets('ios')])
ar = '/usr/bin/ar'
archive_objects(ar, os.path.join(work_dir, 'obj'), os.path.join(work_dir, 'libwebrtc.a'))
if test:
Expand Down Expand Up @@ -627,7 +627,7 @@ def build_webrtc_android(
]
gn_gen(webrtc_src_dir, work_dir, gn_args, extra_gn_args)
if not nobuild:
cmd(['ninja', '-C', work_dir, *get_build_targets('android')])
cmd(['autoninja', '-C', work_dir, *get_build_targets('android')])
ar = os.path.join(webrtc_src_dir, 'third_party/llvm-build/Release+Asserts/bin/llvm-ar')
archive_objects(ar, os.path.join(work_dir, 'obj'), os.path.join(work_dir, 'libwebrtc.a'))
if test:
Expand Down Expand Up @@ -719,7 +719,7 @@ def build_webrtc(
if nobuild:
return

cmd(['ninja', '-C', webrtc_build_dir, *get_build_targets(target)])
cmd(['autoninja', '-C', webrtc_build_dir, *get_build_targets(target)])

if test:
cmd(['autoninja', '-C', webrtc_build_dir, 'rtc_unittests'])
Expand Down
Loading