Compare commits
13 Commits
v105.0.519
...
test_bromi
Author | SHA1 | Date | |
---|---|---|---|
|
f6ee667765 | ||
|
c3eb2dcb7b | ||
|
bd3bf8e9cf | ||
|
7ce76c0224 | ||
|
37512410b0 | ||
|
772162a0db | ||
|
3d1f8a1c0d | ||
|
9832622c39 | ||
|
0e1c4bc71a | ||
|
c59ea691bd | ||
|
daca99c6c5 | ||
|
e826c60239 | ||
|
50441d00bc |
23
.github/workflows/build_bromite_dev.yaml
vendored
23
.github/workflows/build_bromite_dev.yaml
vendored
@@ -22,6 +22,10 @@ on:
|
||||
description: 'arch [arm64/x64]'
|
||||
required: true
|
||||
default: 'x64'
|
||||
targetos:
|
||||
description: 'targetos [android/win]'
|
||||
required: true
|
||||
default: 'android'
|
||||
type:
|
||||
description: 'runner? [dev/ci]'
|
||||
required: true
|
||||
@@ -181,15 +185,22 @@ jobs:
|
||||
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
|
||||
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
|
||||
WORKSPACE: /home/lg/working_dir
|
||||
# kythe
|
||||
KYTHE_CORPUS: chromium.googlesource.com/chromium/src
|
||||
KYTHE_ROOT_DIRECTORY: /home/lg/working_dir/chromium/src
|
||||
KYTHE_OUTPUT_DIRECTORY: /home/lg/working_dir/chromium/src/out/bromite/kythe
|
||||
# cross build
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: /win_sdk/10.0.20348.0/
|
||||
WINDOWSSDKDIR: "/win_sdk/10.0.20348.0/Windows Kits/10/"
|
||||
GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.20348.0/
|
||||
# compile in debug mode
|
||||
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
|
||||
TARGET_CPU: ${{ github.event.inputs.build }}
|
||||
TARGET_OS: ${{ github.event.inputs.targetos }}
|
||||
volumes:
|
||||
- /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
||||
- /storage/images/${{ github.event.inputs.targetos }}/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
||||
- /tmp/proxy:/tmp/proxy
|
||||
- /win_sdk:/win_sdk
|
||||
|
||||
steps:
|
||||
- name: Prepare Build Container
|
||||
@@ -249,10 +260,15 @@ jobs:
|
||||
if [[ OUT_PRESENT -eq 0 ]]; then
|
||||
|
||||
echo "::group::-------- gn gen"
|
||||
if [[ "$TARGET_OS" = "android" ]]
|
||||
then
|
||||
[[ "$USEGOMA" = "true" ]] && \
|
||||
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") use_goma=true goma_dir=\"$WORKSPACE/goma\" $(cat ../../build_args.gni) " out/bromite \
|
||||
|| \
|
||||
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) " out/bromite
|
||||
else
|
||||
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_cpu = \"x64\" target_os = \"win\" $(cat ../../build_args.gni) " out/bromite
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::-------- gn args"
|
||||
@@ -294,10 +310,15 @@ jobs:
|
||||
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
|
||||
cd $WORKSPACE/chromium/src
|
||||
|
||||
if [[ "$TARGET_OS" = "android" ]]
|
||||
then
|
||||
[[ "$USEGOMA" = "true" ]] && \
|
||||
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|
||||
|| \
|
||||
autoninja -C out/bromite chrome_public_apk
|
||||
else
|
||||
autoninja -C out/bromite chrome
|
||||
fi
|
||||
|
||||
- name: Get ninja logs
|
||||
shell: bash
|
||||
|
39
README.md
39
README.md
@@ -1,3 +1,42 @@
|
||||
# bromite-buildtools
|
||||
|
||||
this repo contains my build machine and some scripts I use for Bromite development. the ci uses a modified version of the gihub runner (avaiable [here](https://github.com/uazo/runner)) and use [sysbox](https://github.com/nestybox/sysbox) to improve security. it also contains everything you need to use a self-hosted modified version of [goma](https://github.com/uazo/goma-server) for a multi-machine build
|
||||
|
||||
### Setting-up
|
||||
|
||||
1. Prepare folders
|
||||
|
||||
```
|
||||
cd ~ && mkdir gh-runner
|
||||
cd gh-runner && mkdir docker-inner
|
||||
SYSBOX_UID=$(cat /etc/subuid | grep sysbox | cut -d : -f 2)
|
||||
sudo chown $SYSBOX_UID:$SYSBOX_UID docker-inner/
|
||||
|
||||
mkdir /storage
|
||||
sudo chown $SYSBOX_UID:$SYSBOX_UID /storage
|
||||
```
|
||||
|
||||
2. Clone this repo
|
||||
3. Prepare `.env`
|
||||
|
||||
```
|
||||
cd bromite-buildtools/images/github-runner/
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
4. Edit `.env` file
|
||||
|
||||
```
|
||||
RUNNER_NAME=pd-gh-runner
|
||||
GITHUB_PERSONAL_TOKEN=<git-token>
|
||||
GITHUB_OWNER=uazo
|
||||
GITHUB_REPOSITORY=bromite-buildtools
|
||||
RUNNER_LABELS=dev
|
||||
ALLOWEDAUTHORSLIST=uazo
|
||||
```
|
||||
|
||||
5. Start the runner
|
||||
```
|
||||
cd bromite-buildtools/images/github-runner/
|
||||
./start-runner.sh
|
||||
```
|
||||
|
@@ -18,15 +18,11 @@ for patch in $ALLPATCHS_E; do
|
||||
|
||||
if [ -z "$PATCH_FILE" ]
|
||||
then
|
||||
#git -C ~/chromium/src/ show -s $patch
|
||||
PATCH_FILE=$(git -C ~/chromium/src/ show -s $patch | tail -n 1)
|
||||
if [[ "$PATCH_FILE" != *".patch" ]]; then
|
||||
PATCH_FILE=$NO_NAME.patch
|
||||
NO_NAME=$NO_NAME.1
|
||||
echo No Name ${NO_NAME}, press return
|
||||
PATCH_FILE=00$(git -C ~/chromium/src/ show -s $patch | head -n 5 | tail -n 1 | xargs | tr " " - | tr [:punct:] -).patch
|
||||
echo New Patch: ${PATCH_FILE}
|
||||
fi
|
||||
|
||||
read -n 1
|
||||
fi
|
||||
|
||||
bash ~/bromite-buildtools/export-single-patch.sh $patch $PATCH_FILE
|
||||
|
@@ -16,6 +16,9 @@ for patch in $ALLPATCHS_E; do
|
||||
if [[ "$PATCH_FILE" == *"Automated-domain-substitution"* ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ -z "$PATCH_FILE" ]]; then
|
||||
PATCH_FILE=00$(git -C ~/chromium/src/ show -s $patch | head -n 5 | tail -n 1 | xargs | tr " " - | tr [:punct:] -).patch
|
||||
fi
|
||||
|
||||
echo $PATCH_FILE >>~/bromite/build/patches-new/patch-list
|
||||
|
||||
|
@@ -16,16 +16,29 @@ fi
|
||||
git -C ~/chromium/src/ format-patch -1 --keep-subject --stdout --full-index --zero-commit --no-signature $patch >~/bromite/build/patches-new/$PATCH_FILE
|
||||
echo " exported"
|
||||
|
||||
CHANGE_REF=""
|
||||
while read line; do
|
||||
#echo $line
|
||||
for i in {1..5}
|
||||
do
|
||||
if [[ "$line" == index* ]]; then
|
||||
next_line=$(grep -A1 "${line}" ~/bromite/build/patches-new/$PATCH_FILE | tail -n 1 )
|
||||
read next_line
|
||||
if [[ "$next_line" != "GIT binary patch" ]]; then
|
||||
sed -i "/^$line/d" ~/bromite/build/patches-new/$PATCH_FILE
|
||||
CHANGE_REF=${CHANGE_REF}"/^${line}/d;"
|
||||
break
|
||||
else
|
||||
line=$next_line
|
||||
continue
|
||||
fi
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
done <~/bromite/build/patches-new/$PATCH_FILE
|
||||
|
||||
if [ "$CHANGE_REF" ]
|
||||
then
|
||||
sed -i "$CHANGE_REF" ~/bromite/build/patches-new/$PATCH_FILE
|
||||
fi
|
||||
sed -i '/^From 0000000000000000000000000000000000000000/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
sed -i '/^FILE:/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
sed -i '/^ mode change/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
|
@@ -1,7 +1,6 @@
|
||||
|
||||
declare_args() {
|
||||
_is_debug_build = ""
|
||||
target_cpu = "x64"
|
||||
}
|
||||
|
||||
_is_debug_build = getenv("TARGET_ISDEBUG")
|
||||
@@ -15,14 +14,21 @@ if(getenv("TARGET_CPU") != "") {
|
||||
|
||||
enable_kythe_annotations = true
|
||||
# clang_use_chrome_plugins = false
|
||||
chrome_public_manifest_package = "org.bromite.bromite.dev"
|
||||
if (target_os == "android") {
|
||||
chrome_public_manifest_package = "org.bromite.bromite.dev"
|
||||
}
|
||||
|
||||
if(_is_debug_build == "true") {
|
||||
# print("Debug build on")
|
||||
is_debug = true
|
||||
is_official_build = false
|
||||
dcheck_always_on = true
|
||||
if (target_os == "win") {
|
||||
symbol_level = 0
|
||||
use_large_pdbs = true
|
||||
} else {
|
||||
symbol_level = 1
|
||||
}
|
||||
strip_debug_info = false
|
||||
generate_linker_map = false
|
||||
|
||||
@@ -31,5 +37,12 @@ if(_is_debug_build == "true") {
|
||||
is_cfi = false # disable it
|
||||
use_cfi_cast = false # disable it
|
||||
} else {
|
||||
if (target_os == "android") {
|
||||
generate_linker_map = true
|
||||
}
|
||||
|
||||
if (target_os == "win") {
|
||||
is_cfi = false # disable it
|
||||
use_cfi_cast = false # disable it
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
echo -e ${RED} -------- apply depot_tools patch ${NC}
|
||||
cd depot_tools/
|
||||
#git apply ../depot_tools.diff
|
||||
git apply ../depot_tools.diff
|
||||
git apply ../remove_ninja_uploader.diff
|
||||
cd ..
|
||||
|
||||
@@ -73,3 +73,16 @@ gclient runhooks
|
||||
|
||||
echo -e ${RED} -------- download objdump ${NC}
|
||||
tools/clang/scripts/update.py --package=objdump
|
||||
|
||||
echo -e ${RED} -------- build rc ${NC}
|
||||
cd build/toolchain/win/rc
|
||||
git clone -q https://github.com/nico/hack
|
||||
cd hack/res
|
||||
|
||||
../../../../../../third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ \
|
||||
-std=c++14 rc.cc -Wall \
|
||||
-Wno-c++11-narrowing -O2 -fno-rtti -fno-exceptions -DNDEBUG \
|
||||
-o rc-linux64 -fuse-ld=lld -target x86_64-unknown-linux-gnu
|
||||
cd ../../../../../../
|
||||
cp build/toolchain/win/rc/hack/res/rc-linux64 build/toolchain/win/rc/linux64/rc
|
||||
|
||||
|
@@ -37,6 +37,7 @@ do
|
||||
-v $GHRUNNERHOME/tmp/forward-proxy:/tmp/forward-proxy:rw \
|
||||
-v $GHRUNNERHOME/redis:/redis:rw \
|
||||
-v $GHRUNNERHOME/var/run:/var/run \
|
||||
-v /casefold:/win_sdk \
|
||||
--network none \
|
||||
--device=/dev/kvm \
|
||||
uazo/github-runner
|
||||
|
Reference in New Issue
Block a user