Skip to content

Commit

Permalink
android prefixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu committed Dec 18, 2023
1 parent 805265f commit d6a96ab
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 24 deletions.
8 changes: 4 additions & 4 deletions build/VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WEBRTC_BUILD_VERSION=104.5112.09.0
WEBRTC_VERSION=104.5112.09
WEBRTC_READABLE_VERSION=M104.5112@{#9}
WEBRTC_COMMIT=beb04712c467fb36b48a682ce3afc304920bd062
WEBRTC_BUILD_VERSION=114.5735.06.0
WEBRTC_VERSION=114.5735.06
WEBRTC_READABLE_VERSION=M114.5735@{#6}
WEBRTC_COMMIT=d5afc4b7be7caffbcc213c2a6486dbf3b9492763
25 changes: 25 additions & 0 deletions build/android_prefixed/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:20.04 AS builder

ARG PACKAGE_NAME=android_prefixed
ARG COMMIT_HASH=""

ENV PACKAGE_DIR "/root/_package/$PACKAGE_NAME"

COPY run.py /root/
COPY VERSION /root/
COPY .gclient /root/
COPY patches/ /root/patches/
COPY scripts/ /root/scripts/
COPY $PACKAGE_NAME/ /root/$PACKAGE_NAME/
RUN /root/scripts/apt_install_x86_64.sh \
&& sudo apt-get install -y openjdk-11-jdk \
&& sudo apt-get install -y build-essential
ENV LC_ALL=C.UTF-8
RUN cd /root && python3 run.py build $PACKAGE_NAME --commit "${COMMIT_HASH}"
RUN cd /root && python3 run.py package $PACKAGE_NAME
RUN mv $PACKAGE_DIR/webrtc.tar.gz /

FROM ubuntu:20.04

COPY --from=builder /webrtc.tar.gz /
22 changes: 22 additions & 0 deletions build/build.android_prefixed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

cd `dirname $0`
source VERSION
SCRIPT_DIR="`pwd`"

PACKAGE_NAME=android_prefixed
PACKAGE_DIR="`pwd`/_package/$PACKAGE_NAME"

set -ex

IMAGE_NAME=webrtc/$PACKAGE_NAME:m${WEBRTC_VERSION}
DOCKER_BUILDKIT=1 docker build \
-t $IMAGE_NAME \
-f $PACKAGE_NAME/Dockerfile \
--build-arg COMMIT_HASH="$1" \
.

mkdir -p $PACKAGE_DIR
CONTAINER_ID=`docker container create $IMAGE_NAME`
docker container cp $CONTAINER_ID:/webrtc.tar.gz $PACKAGE_DIR/webrtc.tar.gz
docker container rm $CONTAINER_ID
Loading

0 comments on commit d6a96ab

Please sign in to comment.