Compare commits
33 Commits
test_bromi
...
v107.0.530
Author | SHA1 | Date | |
---|---|---|---|
|
4432e3bc3b | ||
|
400575271c | ||
|
eed67c45b1 | ||
|
f6ceaa75a8 | ||
|
2976fd07ff | ||
|
a880652f08 | ||
|
ac45d8cb17 | ||
|
e22b3b9512 | ||
|
e73b4e3c55 | ||
|
fd8a710847 | ||
|
5bfbb668f4 | ||
|
8bccbc8d51 | ||
|
6a33b40dc0 | ||
|
0500a3879c | ||
|
c515d1a4dc | ||
|
a872a2dee8 | ||
|
fdff032db3 | ||
|
cf67ee0fea | ||
|
60ee49376e | ||
|
a2f4b53004 | ||
|
6ab623651a | ||
|
f1a9ac6b85 | ||
|
79c228817d | ||
|
3c96df9b59 | ||
|
255d44a353 | ||
|
2bede818cd | ||
|
7574d8dbac | ||
|
7fa6f201ac | ||
|
9f874b4107 | ||
|
707e458f8e | ||
|
09730122e9 | ||
|
23a88c1eb8 | ||
|
e1996161c3 |
130
.github/workflows/build-images.yaml
vendored
130
.github/workflows/build-images.yaml
vendored
@@ -3,7 +3,7 @@ permissions:
|
||||
checks: none
|
||||
contents: none
|
||||
deployments: none
|
||||
issues: none
|
||||
issues: write
|
||||
packages: none
|
||||
pull-requests: none
|
||||
repository-projects: none
|
||||
@@ -11,58 +11,102 @@ permissions:
|
||||
statuses: none
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'chromium version'
|
||||
required: false
|
||||
default: ''
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
NEW_VERSION: ${{ null }}
|
||||
|
||||
name: Builds and pushes tagged image to DockerHub
|
||||
jobs:
|
||||
generate_build_deps:
|
||||
name: Generate Build Deps
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Find VERSION
|
||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
||||
- name: Docker Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./images/build-deps
|
||||
push: true
|
||||
build-args: VERSION=${{ env.VERSION }}
|
||||
tags: |
|
||||
uazo/build-deps:${{ env.VERSION }}
|
||||
|
||||
generate_chromium_src:
|
||||
name: Generate Chromium Sources
|
||||
needs: generate_build_deps
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Reclaiming disk space on / by removing dotnet/android/ghc
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo apt-get remove google-cloud-sdk azure-cli ghc-9.0.1 ghc-8.10.4 hhvm google-chrome-stable firefox mysql-server-core-8.0 mono-devel mongodb-org-server podman mongodb-org-mongos powershell dotnet-runtime-3.1 dotnet-runtime-5.0 dotnet-sdk-3.1 dotnet-sdk-5.0
|
||||
sudo apt-get remove google-cloud-sdk azure-cli hhvm google-chrome-stable \
|
||||
firefox mysql-server-core-8.0 mono-devel mongodb-org-server podman mongodb-org-mongos \
|
||||
powershell dotnet-runtime-3.1 dotnet-runtime-5.0 dotnet-sdk-3.1 dotnet-sdk-5.0
|
||||
sudo apt-get autoremove
|
||||
- name: Find VERSION
|
||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
||||
- name: Docker Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
context: ./images/chr-source
|
||||
push: true
|
||||
build-args: VERSION=${{ env.VERSION }}
|
||||
tags: |
|
||||
uazo/chromium:${{ env.VERSION }}
|
||||
path: bromite-buildtools
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Check versions
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -z $VERSION ]; then
|
||||
VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Building build-deps container ${{ env.VERSION }}
|
||||
shell: bash
|
||||
run: |
|
||||
IS_PRESENT=$(docker inspect --type=image uazo/build-deps:$VERSION > /dev/null ; echo $?)
|
||||
if [ $IS_PRESENT -ne "0" ]; then
|
||||
IS_PRESENT=$(docker manifest inspect uazo/build-deps:$VERSION > /dev/null ; echo $?)
|
||||
if [ $IS_PRESENT -ne "0" ]; then
|
||||
DOCKER_BUILDKIT=1 docker build -t uazo/build-deps:$VERSION \
|
||||
--progress plain \
|
||||
--build-arg VERSION=$VERSION \
|
||||
--build-arg HTTP_PROXY="$PROXY_ADDR" \
|
||||
--no-cache \
|
||||
bromite-buildtools/images/build-deps/.
|
||||
|
||||
docker push uazo/build-deps:$VERSION
|
||||
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Building chromium container ${{ env.VERSION }}
|
||||
shell: bash
|
||||
run: |
|
||||
IS_PRESENT=$(docker inspect --type=image uazo/chromium:$VERSION > /dev/null ; echo $?)
|
||||
if [ $IS_PRESENT -ne "0" ]; then
|
||||
IS_PRESENT=$(docker manifest inspect uazo/chromium:$VERSION > /dev/null ; echo $?)
|
||||
if [ $IS_PRESENT -ne "0" ]; then
|
||||
DOCKER_BUILDKIT=1 docker build -t uazo/chromium:$VERSION \
|
||||
--progress plain \
|
||||
--build-arg VERSION=$VERSION \
|
||||
--build-arg HTTP_PROXY="$PROXY_ADDR" \
|
||||
bromite-buildtools/images/chr-source/.
|
||||
|
||||
docker push uazo/chromium:$VERSION
|
||||
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Create issue ${{ env.VERSION }}
|
||||
if: "${{ env.NEW_VERSION != '' }}"
|
||||
shell: bash
|
||||
run: |
|
||||
GH=gh_2.18.1_linux_amd64/bin/gh
|
||||
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
||||
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
||||
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
|
||||
$GH issue create -t "$VERSION: new stable chromium version" -b ""
|
||||
|
||||
|
||||
|
||||
|
286
.github/workflows/build_bromite_dev.yaml
vendored
286
.github/workflows/build_bromite_dev.yaml
vendored
@@ -17,15 +17,15 @@ on:
|
||||
sha:
|
||||
description: 'uazo/bromite SHA'
|
||||
required: true
|
||||
default: '76745fde6ed75542f005ea5528f486df41c56da4'
|
||||
default: ''
|
||||
target_os:
|
||||
description: 'targetos [android/win/all]'
|
||||
required: true
|
||||
default: 'all'
|
||||
build:
|
||||
description: 'arch [arm64/x64]'
|
||||
description: 'android arch [arm64/x64]'
|
||||
required: true
|
||||
default: 'x64'
|
||||
targetos:
|
||||
description: 'targetos [android/win]'
|
||||
required: true
|
||||
default: 'android'
|
||||
type:
|
||||
description: 'runner? [dev/ci]'
|
||||
required: true
|
||||
@@ -34,17 +34,15 @@ on:
|
||||
description: 'debug? [true/false]'
|
||||
required: true
|
||||
default: 'true'
|
||||
usegoma:
|
||||
description: 'Use goma? [true/false]'
|
||||
clangd:
|
||||
description: 'clangd? [true/false]'
|
||||
required: true
|
||||
default: 'false'
|
||||
|
||||
env:
|
||||
BROMITE_SHA: ${{ github.event.inputs.sha }}
|
||||
USEGOMA: ${{ github.event.inputs.usegoma }}
|
||||
REMOVEDOCKERSUPPORT: true
|
||||
USELOCALIMAGE: true
|
||||
GOMAJOBS: 60
|
||||
|
||||
jobs:
|
||||
check_images:
|
||||
@@ -160,27 +158,10 @@ jobs:
|
||||
needs: check_images
|
||||
if: success()
|
||||
timeout-minutes: 720
|
||||
|
||||
services:
|
||||
gomaserver:
|
||||
image: uazo/goma-server
|
||||
volumes:
|
||||
- /tmp/proxy:/tmp/proxy
|
||||
- /redis:/var/lib/redis
|
||||
options: >-
|
||||
--health-cmd "hostname -I >/tmp/proxy/gomaserverip"
|
||||
--health-interval 30s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
env:
|
||||
REMOVEDOCKERSUPPORT: true
|
||||
USELOCALIMAGE: true
|
||||
|
||||
container:
|
||||
image: uazo/bromite-build:build
|
||||
env:
|
||||
SERVER_HOST_GOMA: gomaserver
|
||||
REMOVEDOCKERSUPPORT: true # CUSTOM RUNNER: remove sharing of docker socket
|
||||
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
|
||||
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
|
||||
@@ -196,9 +177,10 @@ jobs:
|
||||
# compile in debug mode
|
||||
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
|
||||
TARGET_CPU: ${{ github.event.inputs.build }}
|
||||
TARGET_OS: ${{ github.event.inputs.targetos }}
|
||||
TARGET_OS: ${{ github.event.inputs.target_os }}
|
||||
volumes:
|
||||
- /storage/images/${{ github.event.inputs.targetos }}/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
||||
- /storage/images/android/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
||||
- /storage/images/win/x64/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite_win
|
||||
- /tmp/proxy:/tmp/proxy
|
||||
- /win_sdk:/win_sdk
|
||||
|
||||
@@ -216,26 +198,14 @@ jobs:
|
||||
http_proxy=
|
||||
https_proxy=
|
||||
|
||||
# update hosts
|
||||
#sudo echo "$(cat /tmp/proxy/gomaserverip | xargs) gomaserver" >/etc/hosts
|
||||
#sudo echo "$(cat /tmp/proxy/redisip | xargs) redis" >/etc/hosts
|
||||
|
||||
# set goma options
|
||||
export SERVER_HOST_GOMA=$(cat /tmp/proxy/gomaserverip | xargs)
|
||||
export GOMA_SERVER_HOST=$SERVER_HOST_GOMA
|
||||
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
|
||||
export GOMA_MAX_SUBPROCS_LOW=0
|
||||
|
||||
# set out folder permissions
|
||||
test -d chromium/src/out/bromite || sudo mkdir -p chromium/src/out/bromite && \
|
||||
sudo chown lg chromium/src/out &&
|
||||
sudo chown lg chromium/src/out/bromite &&
|
||||
sudo chown lg chromium/src/out/bromite
|
||||
|
||||
test -d chromium/src/out/bromite_win || sudo mkdir -p chromium/src/out/bromite_win && \
|
||||
sudo chown lg chromium/src/out &&
|
||||
sudo chown lg chromium/src/out/bromite_win
|
||||
|
||||
# make kythe output directory
|
||||
test -d $KYTHE_OUTPUT_DIRECTORY || mkdir -p $KYTHE_OUTPUT_DIRECTORY
|
||||
@@ -244,111 +214,72 @@ jobs:
|
||||
sudo chown lg /run/user/1000/
|
||||
sudo chmod g-rxw /run/user/1000/
|
||||
sudo chmod o-rxw /run/user/1000/
|
||||
|
||||
# start goma client
|
||||
[[ "$USEGOMA" = "true" ]] && \
|
||||
echo "::group::-------- start goma client" && \
|
||||
$WORKSPACE/goma/goma_ctl.py ensure_stop && \
|
||||
$WORKSPACE/goma/goma_ctl.py ensure_start && \
|
||||
echo "::endgroup::" \
|
||||
|| true
|
||||
|
||||
cd chromium/src
|
||||
|
||||
OUT_PRESENT=0
|
||||
test -f out/bromite/prepare_gn && OUT_PRESENT=1
|
||||
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"
|
||||
gn args out/bromite/ --list --short
|
||||
gn args out/bromite/ --list >out/bromite/gn_list
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::-------- apply .mtool"
|
||||
test -f out/bromite/.mtool && \
|
||||
cp out/bromite/.mtool .mtool && \
|
||||
$WORKSPACE/mtool/chromium/mtime.sh --restore
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "OK" >out/bromite/prepare_gn
|
||||
|
||||
fi
|
||||
|
||||
cp ../../bromite/build/RELEASE out/bromite
|
||||
|
||||
if [[ -z "${GOMAJOBS}" ]]; then
|
||||
GOMAJOBS=40
|
||||
fi
|
||||
|
||||
echo "::group::-------- pre-cache toolchain"
|
||||
[[ "$USEGOMA" = "true" ]] && \
|
||||
sudo ../../casupload --cas-server=unix:/tmp/proxy/bots.sock --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 \
|
||||
|| true
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Build Bromite
|
||||
- name: Build Bromite Android
|
||||
if: ${{ github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all' }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
echo "::group::-------- gn gen"
|
||||
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) " out/bromite
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::-------- gn args"
|
||||
gn args out/bromite/ --list --short
|
||||
gn args out/bromite/ --list >out/bromite/gn_list
|
||||
echo "::endgroup::"
|
||||
|
||||
autoninja -C out/bromite chrome_public_apk
|
||||
|
||||
cp ../../bromite/build/RELEASE out/bromite
|
||||
|
||||
- name: Get ninja logs Android
|
||||
if: ${{ github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all' }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd $WORKSPACE
|
||||
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/bromite/.ninja_log >$WORKSPACE/chromium/src/out/bromite/ninja_log_trace.json
|
||||
$WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite/ninja_log_trace.json
|
||||
|
||||
- name: Get goma logs
|
||||
|
||||
- name: Build Bromite Windows
|
||||
if: ${{ github.event.inputs.target_os == 'win' || github.event.inputs.target_os == 'all' }}
|
||||
shell: bash
|
||||
run: |
|
||||
# reset proxy env
|
||||
HTTP_PROXY=
|
||||
HTTPS_PROXY=
|
||||
http_proxy=
|
||||
https_proxy=
|
||||
|
||||
[[ "$USEGOMA" = "true" ]] && \
|
||||
wget http://127.0.0.1:8088/logz?INFO -O out/bromite/goma-client.log \
|
||||
|| \
|
||||
echo Skipped.
|
||||
|
||||
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
|
||||
|
||||
echo "::group::-------- gn gen"
|
||||
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_os = \"win\" $(cat ../../build_args.gni) target_cpu = \"x64\" " out/bromite_win
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::-------- gn args"
|
||||
gn args out/bromite_win/ --list --short
|
||||
gn args out/bromite_win/ --list >out/bromite_win/gn_list
|
||||
echo "::endgroup::"
|
||||
|
||||
autoninja -C out/bromite_win chrome
|
||||
|
||||
cp ../../bromite/build/RELEASE out/bromite_win
|
||||
|
||||
- name: Get ninja logs Windows
|
||||
if: ${{ github.event.inputs.target_os == 'win' || github.event.inputs.target_os == 'all' }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd $WORKSPACE
|
||||
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/bromite_win/.ninja_log >$WORKSPACE/chromium/src/out/bromite_win/ninja_log_trace.json
|
||||
$WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite_win/ninja_log_trace.json
|
||||
|
||||
- name: Generate breakpad symbols
|
||||
if: ${{ github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all' }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
echo "::group::-------- generating breakpad symbols"
|
||||
autoninja -j $GOMAJOBS -C out/bromite minidump_stackwalk dump_syms
|
||||
autoninja -C out/bromite minidump_stackwalk dump_syms
|
||||
components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/bromite \
|
||||
--symbols-dir=out/bromite/symbols/ --binary=out/bromite/lib.unstripped/libchrome.so \
|
||||
--platform=android --clear --verbose
|
||||
@@ -357,29 +288,17 @@ jobs:
|
||||
cp out/bromite/dump_syms out/bromite/symbols
|
||||
echo "::endgroup::"
|
||||
|
||||
# - name: Generate kythe kzip
|
||||
# shell: bash
|
||||
# run: |
|
||||
# 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
|
||||
#
|
||||
# gn desc out/bromite 'chrome_public_apk' --format=json >out/bromite/gn_targets.json
|
||||
#
|
||||
# #python tools/clang/scripts/run_tool.py --tool translation_unit -p out/bromite/ --all || true
|
||||
# tools/clang/scripts/run_tool.py --tool translation_unit -p out/bromite || true
|
||||
# python /home/lg/add_kythe_metadata.py out/bromite/ --corpus $KYTHE_CORPUS || true
|
||||
#
|
||||
# /home/lg/package_index/latest/package_index \
|
||||
# --checkout_dir /home/lg/working_dir/chromium/src \
|
||||
# --path_to_compdb /home/lg/working_dir/chromium/src/out/bromite/compile_commands.json \
|
||||
# --path_to_gn_targets /home/lg/working_dir/chromium/src/out/bromite/gn_targets.json \
|
||||
# --path_to_java_kzips $KYTHE_OUTPUT_DIRECTORY \
|
||||
# --path_to_archive_output /home/lg/working_dir/chromium/src/out/bromite/chromium_linux.kzip \
|
||||
# --corpus $KYTHE_CORPUS \
|
||||
# --out_dir src/out/bromite || true
|
||||
|
||||
- name: Generate Supersize data
|
||||
if: ${{ github.event.inputs.debug == 'false' && (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
tools/binary_size/supersize archive out/bromite/chrome.size --apk-file out/bromite/apks/ChromePublic.apk -v
|
||||
|
||||
- name: Generate clangd index
|
||||
if: ${{ github.event.inputs.debug == 'true' }}
|
||||
if: ${{ github.event.inputs.debug == 'true' && github.event.inputs.clangd == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
|
||||
@@ -393,65 +312,4 @@ jobs:
|
||||
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/clangd/compile_commands.json >out/bromite/bromite.idx && \
|
||||
rm -rf out/clangd
|
||||
|
||||
- name: Generate Supersize data
|
||||
if: ${{ github.event.inputs.debug == 'false' }}
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
tools/binary_size/supersize archive out/bromite/chrome.size --apk-file out/bromite/apks/ChromePublic.apk -v
|
||||
|
||||
- name: Build junit tests
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
git log | grep FILE:Fix-build-test-suite.patch && TEST=1
|
||||
if [[ TEST -eq 1 ]]; then
|
||||
autoninja -j $GOMAJOBS -C out/bromite chrome_junit_tests
|
||||
autoninja -j $GOMAJOBS -C out/bromite components_junit_tests
|
||||
autoninja -j $GOMAJOBS -C out/bromite content_junit_tests
|
||||
autoninja -j $GOMAJOBS -C out/bromite base_junit_tests
|
||||
autoninja -j $GOMAJOBS -C out/bromite ui_junit_tests
|
||||
fi
|
||||
|
||||
- name: Build c++ tests
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
git log | grep FILE:Fix-build-test-suite.patch && TEST=1
|
||||
if [[ TEST -eq 1 ]]; then
|
||||
autoninja -j $GOMAJOBS -C out/bromite network_service
|
||||
autoninja -j $GOMAJOBS -C out/bromite unit_tests
|
||||
autoninja -j $GOMAJOBS -C out/bromite content_browsertests
|
||||
autoninja -j $GOMAJOBS -C out/bromite components_unittests
|
||||
autoninja -j $GOMAJOBS -C out/bromite components_browsertests
|
||||
fi
|
||||
|
||||
- name: Build instrumentation tests
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
git log | grep FILE:Fix-build-test-suite.patch && TEST=1
|
||||
if [[ TEST -eq 1 ]]; then
|
||||
autoninja -j $GOMAJOBS -C out/bromite content_shell_test_apk
|
||||
autoninja -j $GOMAJOBS -C out/bromite chrome_public_test_apk
|
||||
fi
|
||||
|
||||
- name: Stop goma
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
|
||||
echo "::group::-------- stop goma"
|
||||
[[ "$USEGOMA" = "true" ]] && $WORKSPACE/goma/goma_ctl.py ensure_stop || true
|
||||
[[ "$USEGOMA" = "true" ]] && find /tmp/ -maxdepth 1 -name "gomacc*" -print0 | xargs -0 rm || true
|
||||
[[ "$USEGOMA" = "true" ]] && rm -rf /tmp/goma_lg/ || true
|
||||
echo "::endgroup::"
|
||||
|
117
.github/workflows/release.yaml
vendored
117
.github/workflows/release.yaml
vendored
@@ -17,18 +17,9 @@ on:
|
||||
description: 'runner? [dev/ci]'
|
||||
required: true
|
||||
default: 'ci'
|
||||
debug:
|
||||
description: 'debug? [true/false]'
|
||||
required: true
|
||||
default: 'false'
|
||||
usegoma:
|
||||
description: 'Use goma? [true/false]'
|
||||
required: true
|
||||
default: 'false'
|
||||
|
||||
env:
|
||||
BROMITE_SHA: ${{ github.event.inputs.sha }}
|
||||
USEGOMA: ${{ github.event.inputs.usegoma }}
|
||||
REMOVEDOCKERSUPPORT: true
|
||||
USELOCALIMAGE: true
|
||||
GOMAJOBS: 60
|
||||
@@ -37,7 +28,7 @@ jobs:
|
||||
release:
|
||||
runs-on: ${{ github.event.inputs.type }}
|
||||
env:
|
||||
OUTPUTFILE: /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
OUTPUTFILE: /storage/images/android/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
|
||||
|
||||
steps:
|
||||
@@ -48,49 +39,91 @@ jobs:
|
||||
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
wget https://github.com/cli/cli/releases/download/v2.4.0/gh_2.4.0_linux_amd64.tar.gz
|
||||
tar xfz gh_2.4.0_linux_amd64.tar.gz
|
||||
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
||||
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
||||
|
||||
- name: Checkout 'uazo/buildtools'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'uazo/bromite-buildtools'
|
||||
#ref: ${{ github.event.inputs.rtag }}
|
||||
path: 'bromite'
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Copy artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
sudo cp ${{ env.OUTPUTFILE }}/apks/ChromePublic.apk ChromePublic.apk
|
||||
sudo chown runner ChromePublic.apk
|
||||
mv ChromePublic.apk $APK
|
||||
|
||||
- name: Create release
|
||||
shell: bash
|
||||
run: |
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | gh_2.4.0_linux_amd64/bin/gh auth login --with-token
|
||||
|
||||
cd bromite
|
||||
GH=gh_2.18.1_linux_amd64/bin/gh
|
||||
WINOUT=/storage/images/win/x64/$BROMITE_SHA/
|
||||
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
|
||||
../gh_2.4.0_linux_amd64/bin/gh release create $VERSION-$BROMITE_SHA \
|
||||
../$APK --notes "" -p
|
||||
|
||||
# - name: Enable proxy on container
|
||||
# shell: bash
|
||||
# run: |
|
||||
# if ! [[ -z "${HTTP_PROXY}" ]]; then
|
||||
# PROXY_ADDR=http://$(hostname -I | cut -d' ' -f1 | xargs):8118
|
||||
# echo "PROXY_ADDR=$PROXY_ADDR" >> $GITHUB_ENV
|
||||
# sudo iptables -D INPUT -p tcp -s localhost --dport 8118 -j ACCEPT
|
||||
# sudo iptables -D INPUT -p tcp --dport 8118 -j DROP
|
||||
# fi
|
||||
cd bromite
|
||||
|
||||
GH=gh_2.18.1_linux_amd64/bin/gh
|
||||
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
||||
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
||||
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
|
||||
|
||||
echo "\`\`\`" >note
|
||||
echo "this is not the official release of bromite but a test version." >>note
|
||||
echo "you can try it at your own risk." >>note
|
||||
echo "\`\`\`" >>note
|
||||
|
||||
$GH release create $VERSION-$BROMITE_SHA --notes-file note -d
|
||||
|
||||
# android
|
||||
sudo cp ${{ env.OUTPUTFILE }}/apks/ChromePublic.apk ChromePublic.apk
|
||||
sudo chown runner ChromePublic.apk
|
||||
mv ChromePublic.apk $APK
|
||||
echo Uploading $APK
|
||||
$GH release upload $VERSION-$BROMITE_SHA $APK
|
||||
|
||||
echo Uploading chrome.size
|
||||
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE/chrome.size
|
||||
|
||||
echo Uploading arm64_ninja_log_trace.html
|
||||
cp $OUTPUTFILE/ninja_log_trace.html arm64_ninja_log_trace.html
|
||||
$GH release upload $VERSION-$BROMITE_SHA arm64_ninja_log_trace.html
|
||||
|
||||
# windows
|
||||
mkdir chrome-win/
|
||||
cp $WINOUT/*.manifest chrome-win/
|
||||
cp $WINOUT/chrome.dll chrome-win/
|
||||
cp $WINOUT/chrome.exe chrome-win/
|
||||
cp $WINOUT/chrome_100_percent.pak chrome-win/
|
||||
cp $WINOUT/chrome_200_percent.pak chrome-win/
|
||||
cp $WINOUT/chrome_elf.dll chrome-win/
|
||||
cp $WINOUT/chrome_proxy.exe chrome-win/
|
||||
cp $WINOUT/chrome_pwa_launcher.exe chrome-win/
|
||||
cp $WINOUT/chrome_wer.dll chrome-win/
|
||||
cp "/win_sdk/10.0.20348.0/Windows Kits/10/Redist/D3D/x64/d3dcompiler_47.dll" chrome-win/
|
||||
cp $WINOUT/elevation_service.exe chrome-win/
|
||||
cp "$WINOUT/First Run" chrome-win/
|
||||
cp $WINOUT/headless_lib_data.pak chrome-win/
|
||||
cp $WINOUT/icudtl.dat chrome-win/
|
||||
cp $WINOUT/libEGL.dll chrome-win/
|
||||
cp $WINOUT/libGLESv2.dll chrome-win/
|
||||
cp $WINOUT/Logo.png chrome-win/
|
||||
cp $WINOUT/mojo_core.dll chrome-win/
|
||||
cp $WINOUT/notification_helper.exe chrome-win/
|
||||
cp $WINOUT/resources.pak chrome-win/
|
||||
cp $WINOUT/SmallLogo.png chrome-win/
|
||||
cp $WINOUT/snapshot_blob.bin chrome-win/
|
||||
cp $WINOUT/VkICD_mock_icd.dll chrome-win/
|
||||
cp $WINOUT/VkLayer_khronos_validation.dll chrome-win/
|
||||
cp $WINOUT/vk_swiftshader.dll chrome-win/
|
||||
cp $WINOUT/vulkan-1.dll chrome-win/
|
||||
cp -r $WINOUT/locales chrome-win/locales
|
||||
|
||||
zip -r chrome-win.zip chrome-win/
|
||||
|
||||
echo Uploading chrome-win.zip
|
||||
$GH release upload $VERSION-$BROMITE_SHA chrome-win.zip
|
||||
|
||||
TIMESTAMP=$(date +%s -r chrome-win.zip)
|
||||
echo >updateurl.txt "browser=chromium;os=windows;architecture=64-bit;timestamp=$TIMESTAMP;editor=uazo;channel=stable;repository=https://github.com/uazo/bromite-buildtools/releases;download=https://github.com/uazo/bromite-buildtools/releases/latest/download/chrome-win.zip;version=$(cat $WINOUT/RELEASE);revision=1;commit=$BROMITE_SHA"
|
||||
$GH release upload $VERSION-$BROMITE_SHA updateurl.txt
|
||||
|
||||
$GH release edit $VERSION-$BROMITE_SHA -t $VERSION-$BROMITE_SHA
|
||||
$GH release edit $VERSION-$BROMITE_SHA --draft=false
|
||||
|
||||
# - name: Release build ${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# draft: true
|
||||
# body: Apk for ${{ env.APK }} sha ${{ github.event.inputs.sha }}
|
||||
# files: ${{ env.APK }}
|
||||
# env:
|
||||
# HTTP_PROXY: ${{ env.PROXY_ADDR }}
|
||||
|
@@ -2,6 +2,11 @@ ARG BROMITE_SHA
|
||||
|
||||
FROM uazo/bromite:$BROMITE_SHA
|
||||
|
||||
ARG HTTP_PROXY
|
||||
ENV HTTP_PROXY=$HTTP_PROXY
|
||||
ENV HTTPS_PROXY=$HTTP_PROXY
|
||||
ENV https_proxy=$HTTP_PROXY
|
||||
|
||||
USER lg
|
||||
WORKDIR /home/lg/working_dir
|
||||
|
||||
|
@@ -3,46 +3,40 @@ declare_args() {
|
||||
_is_debug_build = ""
|
||||
}
|
||||
|
||||
_is_debug_build = getenv("TARGET_ISDEBUG")
|
||||
|
||||
not_needed(["_target_build", "_is_debug_build"])
|
||||
|
||||
if(getenv("TARGET_CPU") != "") {
|
||||
target_cpu = getenv("TARGET_CPU")
|
||||
}
|
||||
# print("Target " + target_cpu)
|
||||
|
||||
enable_kythe_annotations = true
|
||||
# clang_use_chrome_plugins = false
|
||||
if (target_os == "android") {
|
||||
enable_kythe_annotations = true
|
||||
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 {
|
||||
_is_debug_build = getenv("TARGET_ISDEBUG")
|
||||
if(_is_debug_build == "true") {
|
||||
# print("Debug build on")
|
||||
is_debug = true
|
||||
is_official_build = false
|
||||
dcheck_always_on = true
|
||||
symbol_level = 1
|
||||
}
|
||||
strip_debug_info = false
|
||||
generate_linker_map = false
|
||||
strip_debug_info = false
|
||||
generate_linker_map = false
|
||||
|
||||
# since is_cfi require use_thin_lto
|
||||
# but not work in debug mode
|
||||
is_cfi = false # disable it
|
||||
use_cfi_cast = false # disable it
|
||||
} else {
|
||||
if (target_os == "android") {
|
||||
generate_linker_map = true
|
||||
}
|
||||
|
||||
if (target_os == "win") {
|
||||
# since is_cfi require use_thin_lto
|
||||
# but not work in debug mode
|
||||
is_cfi = false # disable it
|
||||
use_cfi_cast = false # disable it
|
||||
}
|
||||
} else {
|
||||
generate_linker_map = true
|
||||
}
|
||||
}
|
||||
|
||||
if (target_os == "win") {
|
||||
target_cpu = "x64"
|
||||
symbol_level = 0
|
||||
use_large_pdbs = true
|
||||
|
||||
is_cfi = false # disable it
|
||||
use_cfi_cast = false # disable it
|
||||
}
|
||||
|
@@ -5,9 +5,18 @@ FROM uazo/chromium:$VERSION
|
||||
ARG BROMITE_SHA
|
||||
ENV BROMITE_SHA=$BROMITE_SHA
|
||||
|
||||
ARG HTTP_PROXY
|
||||
ENV HTTP_PROXY=$HTTP_PROXY
|
||||
ENV HTTPS_PROXY=$HTTP_PROXY
|
||||
ENV https_proxy=$HTTP_PROXY
|
||||
|
||||
#USER lg
|
||||
WORKDIR /home/lg/working_dir
|
||||
|
||||
RUN sudo chown lg /etc/apt/apt.conf.d/proxy.conf
|
||||
RUN sudo echo "Acquire::http::Proxy \"$HTTP_PROXY\";" >/etc/apt/apt.conf.d/proxy.conf
|
||||
RUN sudo apt-get update
|
||||
|
||||
COPY apply-bromite-patches.sh .
|
||||
|
||||
RUN sudo chmod +x ./apply-bromite-patches.sh && \
|
||||
|
17
images/image-downloader/check_and_download.sh
Normal file
17
images/image-downloader/check_and_download.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
|
||||
echo Check for $VERSION
|
||||
|
||||
docker -H unix:///home/$USER/gh-runner-ci/var/run/docker.sock pull uazo/build-deps:$VERSION
|
||||
docker -H unix:///home/$USER/gh-runner-ci/var/run/docker.sock pull uazo/chromium:$VERSION
|
||||
|
||||
docker -H unix:///home/$USER/gh-runner/var/run/docker.sock pull uazo/build-deps:$VERSION
|
||||
docker -H unix:///home/$USER/gh-runner/var/run/docker.sock pull uazo/chromium:$VERSION
|
||||
|
||||
sleep 1h
|
||||
|
||||
done
|
Reference in New Issue
Block a user