Initial dockerfiles

This commit is contained in:
uazo
2021-06-19 09:46:24 +00:00
parent 6a3724fb28
commit a669eb5f0c
22 changed files with 450 additions and 0 deletions

View 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

Binary file not shown.

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env python
def main():
return 0

View 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

View 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