Compare commits

..

17 Commits

Author SHA1 Message Date
uazo
42a26fd1db Add VERSION to image names 2023-03-08 17:51:57 +09:00
uazo
b0e084df8e Add VERSION to image names 2023-03-08 17:51:49 +09:00
uazo
b438ab71d9 disable use_relative_vtables_abi 2023-03-06 09:31:51 -09:00
uazo
6b6e64d2a8 Disable kythe annotations 2023-03-04 04:08:30 -10:00
uazo
3ed76fc160 Update Dockerfile 2023-03-02 09:34:42 +01:00
uazo
eb0447a0b5 Removed build/install-build-deps-android.sh from repo 2023-03-02 02:14:07 -06:00
uazo
dda7cece8f Update release.yaml 2023-01-31 12:49:58 +05:00
uazo
d26cceccdf Update release.yaml 2023-01-31 12:32:57 +05:00
uazo
5c005551b8 Update generate.sh 2023-01-31 12:30:40 +05:00
uazo
4ca3d33584 Update generate.sh 2023-01-31 12:29:31 +05:00
uazo
775ca2f448 Update generate.sh 2023-01-31 12:26:05 +05:00
uazo
1dd51fda9b Fix Segmentation fault 2023-01-30 17:41:10 +01:00
uazo
45836ce3ae Use clang to build custom ninja 2023-01-30 17:40:03 +01:00
uazo
e7381936fe Update build_args.gni 2022-12-29 16:51:25 +03:00
uazo
c3b8d405e1 use gh 2.21.1 2022-12-29 09:32:54 +02:00
uazo
5d0b72827e Update README.md 2022-12-28 15:54:15 -01:00
uazo
31dd53a306 enable pdfium in windows 2022-12-28 15:01:38 -01:00
9 changed files with 59 additions and 30 deletions

View File

@@ -114,14 +114,14 @@ jobs:
fi fi
fi fi
- name: Building bromite container ${{ env.BROMITE_SHA }} - name: Building bromite container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash shell: bash
run: | run: |
IS_PRESENT=$(docker inspect --type=image uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?) IS_PRESENT=$(docker inspect --type=image uazo/bromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?) IS_PRESENT=$(docker manifest inspect uazo/bromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/bromite:$BROMITE_SHA --progress plain \ DOCKER_BUILDKIT=1 docker build -t uazo/bromite:$VERSION-$BROMITE_SHA --progress plain \
--build-arg BROMITE_SHA=$BROMITE_SHA \ --build-arg BROMITE_SHA=$BROMITE_SHA \
--build-arg VERSION=$VERSION \ --build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \ --build-arg HTTP_PROXY="$PROXY_ADDR" \
@@ -129,15 +129,16 @@ jobs:
fi fi
fi fi
- name: Building bromite-build container ${{ env.BROMITE_SHA }} - name: Building bromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash shell: bash
run: | run: |
IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$BROMITE_SHA --progress plain \ DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$VERSION-$BROMITE_SHA --progress plain \
--build-arg BROMITE_SHA=$BROMITE_SHA \ --build-arg BROMITE_SHA=$BROMITE_SHA \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \ --build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \ --no-cache \
bromite-buildtools/images/bromite-build/. bromite-buildtools/images/bromite-build/.
@@ -151,7 +152,7 @@ jobs:
if [ $IS_PRESENT -eq "0" ]; then if [ $IS_PRESENT -eq "0" ]; then
docker rmi uazo/bromite-build:build docker rmi uazo/bromite-build:build
fi fi
docker tag uazo/bromite-build:$BROMITE_SHA uazo/bromite-build:build docker tag uazo/bromite-build:$VERSION-$BROMITE_SHA uazo/bromite-build:build
build: build:
runs-on: ${{ github.event.inputs.type }} runs-on: ${{ github.event.inputs.type }}

View File

@@ -58,9 +58,9 @@ jobs:
cd bromite cd bromite
GH=gh_2.18.1_linux_amd64/bin/gh GH=gh_2.21.1_linux_amd64/bin/gh
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz wget https://github.com/cli/cli/releases/download/v2.21.1/gh_2.21.1_linux_amd64.tar.gz
tar xfz gh_2.18.1_linux_amd64.tar.gz tar xfz gh_2.21.1_linux_amd64.tar.gz
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
@@ -117,6 +117,7 @@ jobs:
cp $WINOUT/vulkan-1.dll chrome-win/ cp $WINOUT/vulkan-1.dll chrome-win/
cp -r $WINOUT/locales chrome-win/locales cp -r $WINOUT/locales chrome-win/locales
#test chrome-win.zip && rm chrome-win.zip
zip -r chrome-win.zip chrome-win/ zip -r chrome-win.zip chrome-win/
echo Uploading chrome-win.zip echo Uploading chrome-win.zip

View File

@@ -64,3 +64,30 @@ drwxr-xr-x 3 root root 4096 Oct 5 13:20 'Windows Kits'
cd bromite-buildtools/images/github-runner/ cd bromite-buildtools/images/github-runner/
./start-runner.sh ./start-runner.sh
``` ```
### Test Android Version
Simply download latest build on https://github.com/uazo/bromite-buildtools/releases/latest
### Test Windows Version
1. Download https://github.com/henrypp/chrlauncher/releases
2. Create a `chrlauncher.ini`
```
[chrlauncher]
# Custom Chromium update URL (string):
ChromiumUpdateUrl=https://github.com/uazo/bromite-buildtools/releases/latest/download/updateurl.txt
# Command line for Chromium (string):
# See here: http://peter.sh/experiments/chromium-command-line-switches/
ChromiumCommandLine=--user-data-dir=".\User Data" --no-default-browser-check
# Chromium executable file name (string):
ChromiumBinary=chrome.exe
# Chromium binaries directory (string):
# Relative (to chrlauncher directory) or full path (env. variables supported).
ChromiumDirectory=.\bin
```

View File

@@ -1,6 +1,7 @@
ARG BROMITE_SHA ARG BROMITE_SHA
ARG VERSION
FROM uazo/bromite:$BROMITE_SHA FROM uazo/bromite:$VERSION-$BROMITE_SHA
ARG HTTP_PROXY ARG HTTP_PROXY
ENV HTTP_PROXY=$HTTP_PROXY ENV HTTP_PROXY=$HTTP_PROXY

View File

@@ -10,7 +10,8 @@ if(getenv("TARGET_CPU") != "") {
} }
if (target_os == "android") { if (target_os == "android") {
enable_kythe_annotations = true target_os = "android" # fix traffic annotation auditor
#enable_kythe_annotations = true
chrome_public_manifest_package = "org.bromite.bromite.dev" chrome_public_manifest_package = "org.bromite.bromite.dev"
_is_debug_build = getenv("TARGET_ISDEBUG") _is_debug_build = getenv("TARGET_ISDEBUG")
@@ -29,13 +30,20 @@ if (target_os == "android") {
use_cfi_cast = false # disable it use_cfi_cast = false # disable it
} else { } else {
generate_linker_map = true generate_linker_map = true
use_relative_vtables_abi = false
} }
} }
if (target_os == "win") { if (target_os == "win") {
target_os = "win" # fix traffic annotation auditor
target_cpu = "x64" target_cpu = "x64"
symbol_level = 0 symbol_level = 0
use_large_pdbs = true use_large_pdbs = true
enable_pdf = true
pdf_is_complete_lib = true
enable_plugins = true
enable_ppapi = false
is_cfi = false # disable it is_cfi = false # disable it
use_cfi_cast = false # disable it use_cfi_cast = false # disable it

View File

@@ -59,7 +59,7 @@ cd $WORKSPACE/
git clone https://github.com/ninja-build/ninja.git -b v1.8.2 git clone https://github.com/ninja-build/ninja.git -b v1.8.2
cd ninja cd ninja
git apply $WORKSPACE/bromite-buildtools/ninja-one-target-for-compdb.patch git apply $WORKSPACE/bromite-buildtools/ninja-one-target-for-compdb.patch
./configure.py --bootstrap CXX=clang++ ./configure.py --bootstrap
echo -e ${RED} -------- download clang indexer ${NC} echo -e ${RED} -------- download clang indexer ${NC}
cd $WORKSPACE/ cd $WORKSPACE/

View File

@@ -33,14 +33,11 @@ USER ${user}
WORKDIR /home/${user} WORKDIR /home/${user}
RUN wget https://raw.githubusercontent.com/chromium/chromium/$VERSION/build/install-build-deps.sh \ RUN wget https://raw.githubusercontent.com/chromium/chromium/$VERSION/build/install-build-deps.sh \
&& \
wget https://raw.githubusercontent.com/chromium/chromium/$VERSION/build/install-build-deps-android.sh \
&& \ && \
sed -i 's/snapcraft/wget/' install-build-deps.sh && \ sed -i 's/snapcraft/wget/' install-build-deps.sh && \
chmod +x ./install-build-deps.sh && \ chmod +x ./install-build-deps.sh && \
chmod +x ./install-build-deps-android.sh && \
sudo ./install-build-deps.sh --no-prompt --lib32 --no-chromeos-fonts && \ sudo ./install-build-deps.sh --no-prompt --lib32 --no-chromeos-fonts && \
sudo ./install-build-deps-android.sh --no-prompt && \ sudo ./install-build-deps.sh --android --no-prompt --no-chromeos-fonts && \
sudo mkdir -p /github/home/.vscode-server && \ sudo mkdir -p /github/home/.vscode-server && \
sudo chown lg /github/home/.vscode-server sudo chown lg /github/home/.vscode-server

View File

@@ -1,19 +1,13 @@
#!/bin/bash #!/bin/bash
if [[ -z "${DOCKER_SOCK}" ]]; then if [[ -z "${INDEX_VERSION}" ]]; then
echo "Please set DOCKER_SOCK env variable" echo "Please set INDEX_VERSION env variable"
exit 1 exit 1
fi fi
if [[ -z "${DEV_CONTAINER}" ]]; then cp /storage/images/android/x64/$INDEX_VERSION/bromite.idx .
echo "Please set DEV_CONTAINER env variable" cp /storage/images/android/x64/$INDEX_VERSION/RELEASE .
exit 1
fi
sudo docker -H $DOCKER_SOCK cp $DEV_CONTAINER:/home/lg/working_dir/chromium/src/out/bromite/bromite.idx .
sudo docker -H $DOCKER_SOCK cp $DEV_CONTAINER:/home/lg/working_dir/bromite/build/RELEASE .
#INDEX_VERSION=$(cat RELEASE)
DOCKER_BUILDKIT=1 docker build -t uazo/bromite-remote-index:$INDEX_VERSION \ DOCKER_BUILDKIT=1 docker build -t uazo/bromite-remote-index:$INDEX_VERSION \
--progress plain \ --progress plain \
--no-cache \ --no-cache \

View File

@@ -73,6 +73,7 @@ index ed004ac8f1fe1a5107db8b1f5c02c4ba957daef4..bbb79da561ddec497863230cd99ffbe9
+ +
int NinjaMain::ToolCompilationDatabase(const Options* options, int argc, char* argv[]) { int NinjaMain::ToolCompilationDatabase(const Options* options, int argc, char* argv[]) {
+ std::vector<Edge*>* edges_to_process = &(state_.edges_); + std::vector<Edge*>* edges_to_process = &(state_.edges_);
+ std::vector<Edge*> user_interested_edges;
+ +
+ if (options->user_given_target) { + if (options->user_given_target) {
+ string err; + string err;
@@ -83,7 +84,6 @@ index ed004ac8f1fe1a5107db8b1f5c02c4ba957daef4..bbb79da561ddec497863230cd99ffbe9
+ return 1; + return 1;
+ } + }
+ +
+ std::vector<Edge*> user_interested_edges;
+ if (!GetAllDependentEdges(user_given_target, &user_interested_edges)) + if (!GetAllDependentEdges(user_given_target, &user_interested_edges))
+ return 1; + return 1;
+ edges_to_process = &user_interested_edges; + edges_to_process = &user_interested_edges;