Skip to content

Commit f7689c2

Browse files
authored
Android prefixed build (#17)
* android prefixed build * Add to github actions * turn off windows/mac builds for testing * More turn off windows/mac testing * Fix up patches for m114 * Put back windows/mac builds * Revert "Put back windows/mac builds" This reverts commit c3ea942.
1 parent 805265f commit f7689c2

File tree

8 files changed

+593
-79
lines changed

8 files changed

+593
-79
lines changed

.github/workflows/build.yml

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,63 +20,63 @@ on:
2020
- '*'
2121

2222
jobs:
23-
build-windows:
24-
defaults:
25-
run:
26-
working-directory: .\\build
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
name:
31-
- windows_x86_64
32-
- windows_arm64
33-
runs-on: windows-2019
34-
steps:
35-
- uses: actions/checkout@v2
36-
- name: Disk Cleanup
37-
run: |
38-
Get-PSDrive
39-
# Cache 済み Docker Image の削除
40-
# Clean unused docker images
41-
docker rmi $(docker images -q -a)
42-
# Android SDK の削除
43-
# Delete Android SDK
44-
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
45-
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
46-
# JVM の削除
47-
# Delete JVM
48-
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
49-
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
50-
Get-PSDrive
51-
- run: "& .\\build.${{ matrix.name }}.ps1 \"${{ github.event.inputs.commitHash }}\""
52-
- name: Upload Artifact
53-
uses: actions/upload-artifact@v1
54-
with:
55-
name: webrtc.${{ matrix.name }}.zip
56-
path: build\_package\${{ matrix.name }}\webrtc.zip
57-
build-macos:
58-
defaults:
59-
run:
60-
working-directory: ./build
61-
strategy:
62-
fail-fast: false
63-
matrix:
64-
name:
65-
- macos_arm64
66-
- macos_x86_64
67-
- ios
68-
runs-on: macos-11
69-
steps:
70-
- uses: actions/checkout@v2
71-
- name: Select Xcode 13.0
72-
run: sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer
73-
- run: brew install ninja
74-
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
75-
- name: Upload Artifact
76-
uses: actions/upload-artifact@v1
77-
with:
78-
name: webrtc.${{ matrix.name }}.tar.gz
79-
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
23+
# build-windows:
24+
# defaults:
25+
# run:
26+
# working-directory: .\\build
27+
# strategy:
28+
# fail-fast: false
29+
# matrix:
30+
# name:
31+
# - windows_x86_64
32+
# - windows_arm64
33+
# runs-on: windows-2019
34+
# steps:
35+
# - uses: actions/checkout@v2
36+
# - name: Disk Cleanup
37+
# run: |
38+
# Get-PSDrive
39+
# # Cache 済み Docker Image の削除
40+
# # Clean unused docker images
41+
# docker rmi $(docker images -q -a)
42+
# # Android SDK の削除
43+
# # Delete Android SDK
44+
# Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
45+
# Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
46+
# # JVM の削除
47+
# # Delete JVM
48+
# Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
49+
# Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
50+
# Get-PSDrive
51+
# - run: "& .\\build.${{ matrix.name }}.ps1 \"${{ github.event.inputs.commitHash }}\""
52+
# - name: Upload Artifact
53+
# uses: actions/upload-artifact@v1
54+
# with:
55+
# name: webrtc.${{ matrix.name }}.zip
56+
# path: build\_package\${{ matrix.name }}\webrtc.zip
57+
# build-macos:
58+
# defaults:
59+
# run:
60+
# working-directory: ./build
61+
# strategy:
62+
# fail-fast: false
63+
# matrix:
64+
# name:
65+
# - macos_arm64
66+
# - macos_x86_64
67+
# - ios
68+
# runs-on: macos-11
69+
# steps:
70+
# - uses: actions/checkout@v2
71+
# - name: Select Xcode 13.0
72+
# run: sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer
73+
# - run: brew install ninja
74+
# - run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
75+
# - name: Upload Artifact
76+
# uses: actions/upload-artifact@v1
77+
# with:
78+
# name: webrtc.${{ matrix.name }}.tar.gz
79+
# path: build/_package/${{ matrix.name }}/webrtc.tar.gz
8080
build-linux:
8181
defaults:
8282
run:
@@ -94,6 +94,7 @@ jobs:
9494
# - ubuntu-20.04_x86_64
9595
# - ubuntu-22.04_x86_64
9696
- android
97+
- android_prefixed
9798
runs-on: buildjet-4vcpu-ubuntu-2204
9899
steps:
99100
- uses: actions/checkout@v2
@@ -117,8 +118,8 @@ jobs:
117118
name: Create Release
118119
if: contains(github.ref, 'tags/m')
119120
needs:
120-
- build-windows
121-
- build-macos
121+
# - build-windows
122+
# - build-macos
122123
- build-linux
123124
runs-on: ubuntu-20.04
124125
steps:

build/VERSION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
WEBRTC_BUILD_VERSION=104.5112.09.0
2-
WEBRTC_VERSION=104.5112.09
3-
WEBRTC_READABLE_VERSION=M104.5112@{#9}
4-
WEBRTC_COMMIT=beb04712c467fb36b48a682ce3afc304920bd062
1+
WEBRTC_BUILD_VERSION=114.5735.06.0
2+
WEBRTC_VERSION=114.5735.06
3+
WEBRTC_READABLE_VERSION=M114.5735@{#6}
4+
WEBRTC_COMMIT=d5afc4b7be7caffbcc213c2a6486dbf3b9492763

build/android_prefixed/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# syntax = docker/dockerfile:experimental
2+
FROM ubuntu:20.04 AS builder
3+
4+
ARG PACKAGE_NAME=android_prefixed
5+
ARG COMMIT_HASH=""
6+
7+
ENV PACKAGE_DIR "/root/_package/$PACKAGE_NAME"
8+
9+
COPY run.py /root/
10+
COPY VERSION /root/
11+
COPY .gclient /root/
12+
COPY patches/ /root/patches/
13+
COPY scripts/ /root/scripts/
14+
COPY $PACKAGE_NAME/ /root/$PACKAGE_NAME/
15+
RUN /root/scripts/apt_install_x86_64.sh \
16+
&& sudo apt-get install -y openjdk-11-jdk \
17+
&& sudo apt-get install -y build-essential
18+
ENV LC_ALL=C.UTF-8
19+
RUN cd /root && python3 run.py build $PACKAGE_NAME --commit "${COMMIT_HASH}"
20+
RUN cd /root && python3 run.py package $PACKAGE_NAME
21+
RUN mv $PACKAGE_DIR/webrtc.tar.gz /
22+
23+
FROM ubuntu:20.04
24+
25+
COPY --from=builder /webrtc.tar.gz /

build/build.android_prefixed.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
cd `dirname $0`
4+
source VERSION
5+
SCRIPT_DIR="`pwd`"
6+
7+
PACKAGE_NAME=android_prefixed
8+
PACKAGE_DIR="`pwd`/_package/$PACKAGE_NAME"
9+
10+
set -ex
11+
12+
IMAGE_NAME=webrtc/$PACKAGE_NAME:m${WEBRTC_VERSION}
13+
DOCKER_BUILDKIT=1 docker build \
14+
-t $IMAGE_NAME \
15+
-f $PACKAGE_NAME/Dockerfile \
16+
--build-arg COMMIT_HASH="$1" \
17+
.
18+
19+
mkdir -p $PACKAGE_DIR
20+
CONTAINER_ID=`docker container create $IMAGE_NAME`
21+
docker container cp $CONTAINER_ID:/webrtc.tar.gz $PACKAGE_DIR/webrtc.tar.gz
22+
docker container rm $CONTAINER_ID
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py
2-
index 86b4cd01f0..cf927670ee 100755
2+
index d945b43cca..f09ed3702b 100755
33
--- a/tools_webrtc/libs/generate_licenses.py
44
+++ b/tools_webrtc/libs/generate_licenses.py
5-
@@ -91,6 +91,12 @@ LIB_TO_LICENSES_DICT = {
6-
'yasm': [],
5+
@@ -86,6 +86,11 @@ LIB_TO_LICENSES_DICT = {
6+
# Compile time dependencies, no license needed:
77
'ow2_asm': [],
88
'jdk': [],
99
+
10-
+ 'dav1d': ['third_party/dav1d/LICENSE'],
1110
+ 'catapult': [],
1211
+ 'google_benchmark': [],
1312
+ 'googletest': [],
1413
+ 'vinn': [],
1514
}
1615

1716
# Third_party library _regex_ to licences mapping. Keys are regular expression
17+

build/patches/fix_mocks.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ index 8483aa3da8..f66cdca0ba 100644
1111
} // namespace test
1212
} // namespace webrtc
1313
diff --git a/pc/test/fake_audio_capture_module.h b/pc/test/fake_audio_capture_module.h
14-
index fd13a85f89..81bdbf9f8c 100644
14+
index c04373cdfd..ab6ff3492a 100644
1515
--- a/pc/test/fake_audio_capture_module.h
1616
+++ b/pc/test/fake_audio_capture_module.h
17-
@@ -140,6 +140,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule,
18-
int32_t EnableBuiltInNS(bool enable) override { return -1; }
17+
@@ -137,6 +137,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule {
1918

2019
int32_t GetPlayoutUnderrunCount() const override { return -1; }
21-
+
20+
2221
+ int32_t SetAudioDeviceSink(webrtc::AudioDeviceSink* sink) const override { return 0; }
23-
#if defined(WEBRTC_IOS)
24-
int GetPlayoutAudioParameters(
25-
webrtc::AudioParameters* params) const override {
22+
+
23+
absl::optional<webrtc::AudioDeviceModule::Stats> GetStats() const override {
24+
return webrtc::AudioDeviceModule::Stats();
25+
}

0 commit comments

Comments
 (0)