Initial dockerfiles
This commit is contained in:
23
images/bromite-build/Dockerfile
Normal file
23
images/bromite-build/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
ARG VERSION
|
||||
|
||||
FROM localhost:5000/uazo/bromite:$VERSION
|
||||
ARG VERSION
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
USER lg
|
||||
|
||||
COPY pre-start.sh .
|
||||
COPY start-build.sh .
|
||||
COPY goma_auth.py .
|
||||
COPY casupload .
|
||||
|
||||
RUN sudo chmod +x ./start-build.sh \
|
||||
&& \
|
||||
sudo chmod +x ./pre-start.sh \
|
||||
&& \
|
||||
sudo chmod 775 ./goma_auth.py \
|
||||
&& \
|
||||
./pre-start.sh
|
||||
|
||||
CMD ./start-build.sh
|
||||
|
||||
BIN
images/bromite-build/casupload
Executable file
BIN
images/bromite-build/casupload
Executable file
Binary file not shown.
3
images/bromite-build/goma_auth.py
Normal file
3
images/bromite-build/goma_auth.py
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
def main():
|
||||
return 0
|
||||
19
images/bromite-build/pre-start.sh
Normal file
19
images/bromite-build/pre-start.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
WORKSPACE=/home/lg/working_dir
|
||||
|
||||
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$PATH
|
||||
|
||||
sudo apt-get install -y lsof libgoogle-glog-dev libprotobuf17 libgrpc++1
|
||||
cipd install infra/goma/client/linux-amd64 -root $WORKSPACE/goma
|
||||
|
||||
echo "nomatter" >$WORKSPACE/.debug_auth_file
|
||||
sudo cp $WORKSPACE/goma_auth.py $WORKSPACE/goma/
|
||||
|
||||
cd chromium/src
|
||||
|
||||
echo -e ${RED} -------- gn gen ${NC}
|
||||
gn gen --args="$(cat ../../bromite/build/GN_ARGS) target_cpu=\"x86\" use_goma=true goma_dir=\"$WORKSPACE/goma\" " out/bromite
|
||||
42
images/bromite-build/start-build.sh
Normal file
42
images/bromite-build/start-build.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
WORKSPACE=/home/lg/working_dir
|
||||
|
||||
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$PATH
|
||||
|
||||
export GOMA_SERVER_HOST=127.0.0.1
|
||||
export GOMA_SERVER_PORT=5050
|
||||
export GOMA_USE_SSL=false
|
||||
export GOMA_HTTP_AUTHORIZATION_FILE=$WORKSPACE/.debug_auth_file
|
||||
export GOMA_HERMETIC=error
|
||||
export GOMA_USE_LOCAL=false
|
||||
export GOMA_FALLBACK=true
|
||||
export GOMA_ARBITRARY_TOOLCHAIN_SUPPORT=true
|
||||
|
||||
$WORKSPACE/goma/goma_ctl.py ensure_stop
|
||||
$WORKSPACE/goma/goma_ctl.py ensure_start
|
||||
|
||||
cd chromium/src
|
||||
|
||||
if [[ -z "${GOMAJOBS}" ]]; then
|
||||
GOMAJOBS=40
|
||||
fi
|
||||
|
||||
echo -e ${RED} -------- pre-cache toolchain ${NC}
|
||||
../../casupload --cas-server=http://$REMOTEEXEC_ADDR --instance=default_instance \
|
||||
third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
|
||||
third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/include \
|
||||
third_party/llvm-build/Release+Asserts/lib \
|
||||
third_party/llvm-build/Release+Asserts/bin \
|
||||
buildtools/third_party/libc++ \
|
||||
chrome/android/profiles/afdo.prof
|
||||
|
||||
|
||||
echo -e ${RED} -------- start build ${NC}
|
||||
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk
|
||||
|
||||
bash
|
||||
|
||||
Reference in New Issue
Block a user