Compare commits

...

125 Commits

Author SHA1 Message Date
uazo 813cea7bd5
Update win_sdk 10.0.22621.0 2023-05-20 14:44:56 +03:00
uazo 0c4f152b89
Update build_bromite_dev.yaml 2023-05-09 02:43:53 -08:00
uazo 2493688ed2
increase timeout to 20 hours 2023-05-09 01:42:51 -05:00
uazo 2e590285d4
Fix release name 2023-05-02 11:32:48 +04:00
uazo 248956d7ab
Add android x64 2023-05-02 10:59:00 +04:00
Carmelo Messina 7d8f0cc0d5 add buildx 2023-05-01 17:08:28 +02:00
uazo 789763aa43
Update build_bromite_dev.yaml 2023-04-21 00:28:02 -06:00
uazo bfc4344c08
Merge pull request #154 from uazo/uazo-patch-3
Update build_bromite_dev.yaml
2023-04-20 08:01:31 -04:00
uazo 3f88c4057b
Update build_bromite_dev.yaml 2023-04-20 08:01:05 -04:00
uazo af699d0a79
Update build_bromite_dev.yaml 2023-04-20 07:48:08 -04:00
uazo e4d8215edc
Update build_bromite_dev.yaml 2023-04-20 07:43:31 -04:00
uazo 14d985bb11
Update build_bromite_dev.yaml 2023-04-20 07:37:17 -04:00
uazo ec5f36abea
Update release.yaml 2023-04-20 07:21:05 -04:00
uazo d440dfaf35
Add android x64 build 2023-04-20 07:20:36 -04:00
Carmelo Messina 00ea75681d update github runner to 2.303.1 2023-04-20 11:00:56 +02:00
Carmelo Messina 9d7d84d78f update runner to 2.303.1 2023-04-20 10:21:41 +02:00
uazo 7e8fa5f370
Use sdk 10.0.22621.0
fix https://github.com/uazo/bromite-buildtools/issues/43
2023-04-04 06:33:48 +00:00
uazo 23701f3eb8
Merge pull request #126 from uazo/uazo-patch-1
Force use python3 for trace2html
2023-04-04 06:30:45 +00:00
uazo 9bfaadc2f6
Fix trace2html 2023-04-04 06:29:19 +00:00
Carmelo Messina 873b33fe1b do not export the patch if it is tagged with NOEXPORT 2023-03-24 15:47:50 +01:00
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
uazo 0f16965303
Update release.yaml 2022-11-26 05:36:06 -04:00
uazo ae23aa6a50
workaround for ci issue 2022-11-26 05:33:27 -04:00
uazo f8ca8ac409
Update build-images.yaml 2022-11-22 09:13:49 +02:00
uazo e67921d3be
Update check_git_apply.yaml 2022-11-03 18:26:58 +07:00
uazo 2ed940ac6b
Update check_git_apply.yaml 2022-11-03 17:53:31 +07:00
uazo 8d94379ee0
Update check_git_apply.yaml 2022-11-03 17:26:47 +07:00
uazo 880500e350
Update check_git_apply.yaml 2022-11-03 03:33:20 -06:00
uazo c2d9bd63c6
Update check_git_apply.yaml 2022-11-03 03:32:05 -06:00
uazo 704b14ac14
Update check_git_apply.yaml 2022-11-03 03:15:26 -06:00
uazo 99970aa83e
Update check_git_apply.yaml 2022-11-03 03:12:25 -06:00
uazo 2be587466f
Update check_git_apply.yaml 2022-11-03 03:09:53 -06:00
uazo e6d5e6dbb0
Update check_git_apply.yaml 2022-11-03 02:53:45 -06:00
uazo 6322e96a90
Update check_git_apply.yaml 2022-11-03 02:49:55 -06:00
uazo c7cfc1326e
Update check_git_apply.yaml 2022-11-03 02:42:33 -06:00
uazo 1e70336bec
Update check_git_apply.yaml 2022-11-03 02:30:52 -06:00
uazo 652a8977a1
Update check_git_apply.yaml 2022-10-28 07:59:40 -08:00
uazo 7d8ef4250e
Update check_git_apply.yaml 2022-10-28 07:56:57 -08:00
uazo 7708decfcc
Update Dockerfile 2022-10-28 07:55:28 -08:00
uazo 46966bdcef
Update proxy.conf 2022-10-28 07:54:59 -08:00
uazo 4ff08df321
Update check_git_apply.yaml 2022-10-28 07:54:09 -08:00
uazo 967b46c94f
Update check_git_apply.yaml 2022-10-28 07:48:37 -08:00
uazo 73d719f6db
Update check_git_apply.yaml 2022-10-28 07:46:52 -08:00
uazo bf5dbce4be
Update check_git_apply.yaml 2022-10-28 07:44:24 -08:00
uazo f3d1b4cc04
Update check_git_apply.yaml 2022-10-28 07:42:19 -08:00
uazo 3d61c83219
Update check_git_apply.yaml 2022-10-28 07:37:31 -08:00
uazo 99fc6289da
Update check_git_apply.yaml 2022-10-28 07:36:23 -08:00
uazo 946df3e35d
Update check_git_apply.yaml 2022-10-28 07:35:12 -08:00
uazo c4f7fedb9a
Update check_git_apply.yaml 2022-10-28 07:16:26 -08:00
uazo 259d916fd8
Update check_git_apply.yaml 2022-10-28 07:15:01 -08:00
uazo a8ed4b9dd2
Update check_git_apply.yaml 2022-10-28 07:12:46 -08:00
uazo 7a79901e2a
Update check_git_apply.yaml 2022-10-28 14:24:11 +00:00
uazo d9d39e238b
Update check_git_apply.yaml 2022-10-28 14:16:11 +00:00
uazo 312a3dd9cc
Update check_git_apply.yaml 2022-10-28 14:12:24 +00:00
uazo 99c7eed766
Update check_git_apply.yaml 2022-10-28 14:09:49 +00:00
uazo 6bf80440e1
Update check_git_apply.yaml 2022-10-28 10:18:46 -02:00
uazo 7686c97268
Update check_git_apply.yaml 2022-10-28 10:17:49 -02:00
uazo a4abb945ef
Update check_git_apply.yaml 2022-10-28 10:12:07 -02:00
uazo 5258713cc6
Update check_git_apply.yaml 2022-10-28 09:50:38 -02:00
uazo 8e00d11fc9
Update check_git_apply.yaml 2022-10-28 09:47:37 -02:00
uazo 04c2891f63
Update Dockerfile 2022-10-28 09:41:41 -02:00
uazo 4923c1bd3d
Update check_git_apply.yaml 2022-10-28 08:15:11 -02:00
uazo ce6a6a21bd
Update check_git_apply.yaml 2022-10-28 08:10:28 -02:00
uazo 1a36777b32
add proxy 2022-10-28 08:09:01 -02:00
uazo dfe7692d80
Update check_git_apply.yaml 2022-10-28 08:04:25 -02:00
uazo e0ae9cdad0
Added dos2unix and wiggle 2022-10-28 08:04:02 -02:00
uazo a713e49b62
Update check_git_apply.yaml 2022-10-28 08:00:59 -02:00
uazo 911e10dec7
Update check_git_apply.yaml 2022-10-28 07:59:29 -02:00
uazo 9b0002223d
enable use of local images 2022-10-28 07:55:11 -02:00
uazo b6c627c29f
Update check_git_apply.yaml 2022-10-28 07:53:31 -02:00
uazo 405be869fd
Update check_git_apply.yaml 2022-10-28 07:48:51 -02:00
uazo aa646fed5d
Update check_git_apply.yaml 2022-10-28 07:33:06 -02:00
uazo 960c195a73
Update check_git_apply.yaml 2022-10-28 07:31:08 -02:00
uazo 0622111b34
Create check_git_apply.yaml 2022-10-28 07:08:14 -02:00
uazo ed3fb656cb
fix create issue step 2022-10-26 17:28:49 +11:00
uazo 7b14f5ba33
update instruction for windows cross building 2022-10-22 22:24:30 +07:00
uazo 4432e3bc3b
Update build_args.gni 2022-10-21 07:15:27 -08:00
uazo 400575271c
fix windows build target 2022-10-21 06:58:53 -08:00
uazo eed67c45b1
Update release.yaml 2022-10-21 08:18:22 -06:00
uazo f6ceaa75a8
add logs 2022-10-21 08:01:49 -06:00
uazo 2976fd07ff
Update release.yaml 2022-10-21 07:18:36 -06:00
uazo a880652f08
Update release.yaml 2022-10-21 07:15:15 -06:00
uazo ac45d8cb17
Update release.yaml 2022-10-21 07:08:53 -06:00
uazo e22b3b9512
Update build-images.yaml 2022-10-21 06:36:07 -06:00
uazo e73b4e3c55
Update build-images.yaml 2022-10-21 06:33:15 -06:00
uazo fd8a710847
Update build-images.yaml 2022-10-21 06:32:19 -06:00
uazo 5bfbb668f4
Rename image-downloader/check_and_download.sh to images/image-downloader/check_and_download.sh 2022-10-21 06:01:36 -06:00
uazo 8bccbc8d51
Create check_and_download.sh 2022-10-21 05:51:10 -06:00
uazo 6a33b40dc0
fix target_cpu for windows 2022-10-21 04:28:39 -06:00
uazo 0500a3879c
Update release.yaml 2022-10-21 03:59:39 -06:00
uazo c515d1a4dc
Update release.yaml 2022-10-21 03:43:27 -06:00
uazo a872a2dee8
fix order 2022-10-20 09:01:05 +02:00
uazo fdff032db3
add use_large_pdbs = true windows flag 2022-10-20 08:53:37 +02:00
uazo cf67ee0fea
Update Dockerfile 2022-10-17 18:02:31 +02:00
uazo 60ee49376e
Update Dockerfile 2022-10-17 17:52:04 +02:00
uazo a2f4b53004
Update Dockerfile 2022-10-17 17:51:05 +02:00
uazo 6ab623651a
Update Dockerfile 2022-10-17 17:42:54 +02:00
uazo f1a9ac6b85
Update release.yaml 2022-10-17 09:03:42 +02:00
uazo 79c228817d
android and windows targets 2022-10-17 08:55:53 +02:00
uazo 3c96df9b59
Update build-images.yaml 2022-10-16 18:03:17 +02:00
uazo 255d44a353
Update build-images.yaml 2022-10-16 17:56:31 +02:00
uazo 2bede818cd
Update build-images.yaml 2022-10-16 17:52:34 +02:00
uazo 7574d8dbac
Update build-images.yaml 2022-10-16 17:48:41 +02:00
uazo 7fa6f201ac
Update build-images.yaml 2022-10-16 16:17:33 +02:00
uazo 9f874b4107
Update build-images.yaml 2022-10-16 16:12:50 +02:00
uazo 707e458f8e
Update build-images.yaml 2022-10-16 16:10:57 +02:00
uazo 09730122e9
Update build-images.yaml 2022-10-16 15:45:46 +02:00
uazo 23a88c1eb8
Update build-images.yaml 2022-10-16 15:41:37 +02:00
uazo e1996161c3
Update build-images.yaml 2022-10-16 15:38:57 +02:00
17 changed files with 585 additions and 378 deletions

View File

@ -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,103 @@ permissions:
statuses: none
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'chromium version'
required: false
default: ''
schedule:
- cron: '0 1 * * *'
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 google-chrome-stable \
firefox mysql-server-core-8.0 mono-devel podman \
powershell
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
cd bromite-buildtools
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
$GH issue create -t "$VERSION: new stable chromium version" -b ""

View File

@ -17,34 +17,32 @@ 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/all]'
required: true
default: 'x64'
targetos:
description: 'targetos [android/win]'
required: true
default: 'android'
default: 'all'
type:
description: 'runner? [dev/ci]'
required: true
default: 'dev'
default: 'ci'
debug:
description: 'debug? [true/false]'
required: true
default: 'true'
usegoma:
description: 'Use goma? [true/false]'
default: '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:
@ -116,14 +114,14 @@ jobs:
fi
fi
- name: Building bromite container ${{ env.BROMITE_SHA }}
- name: Building bromite container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash
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
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
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 VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
@ -131,15 +129,16 @@ jobs:
fi
fi
- name: Building bromite-build container ${{ env.BROMITE_SHA }}
- name: Building bromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash
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
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
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 VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \
bromite-buildtools/images/bromite-build/.
@ -153,34 +152,17 @@ jobs:
if [ $IS_PRESENT -eq "0" ]; then
docker rmi uazo/bromite-build:build
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:
runs-on: ${{ github.event.inputs.type }}
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
timeout-minutes: 1200
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
@ -190,15 +172,16 @@ jobs:
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/
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: /win_sdk/10.0.22621.0/
WINDOWSSDKDIR: "/win_sdk/10.0.22621.0/Windows Kits/10/"
GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.22621.0/
# 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.sha }}/${{ github.event.inputs.debug }}/arm64:/home/lg/working_dir/chromium/src/out/bromite
- /storage/images/android/${{ github.event.inputs.sha }}/${{ github.event.inputs.debug }}/x64:/home/lg/working_dir/chromium/src/out/bromite_x64
- /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,27 +199,19 @@ 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
test -d chromium/src/out/bromite_x64 || sudo mkdir -p chromium/src/out/bromite_x64 && \
sudo chown lg chromium/src/out &&
sudo chown lg chromium/src/out/bromite_x64
# make kythe output directory
test -d $KYTHE_OUTPUT_DIRECTORY || mkdir -p $KYTHE_OUTPUT_DIRECTORY
@ -244,111 +219,101 @@ 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 arm64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm64' || github.event.inputs.build == '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) target_cpu = \"arm64\" " 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 arm64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm64' || github.event.inputs.build == '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
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite/ninja_log_trace.json
- 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=
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
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite_win/ninja_log_trace.json
- name: Build Bromite Android x64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'x64' || github.event.inputs.build == '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::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"x64\" " out/bromite_x64
echo "::endgroup::"
echo "::group::-------- gn args"
gn args out/bromite_x64/ --list --short
gn args out/bromite_x64/ --list >out/bromite_x64/gn_list
echo "::endgroup::"
autoninja -C out/bromite_x64 chrome_public_apk
cp ../../bromite/build/RELEASE out/bromite_x64
- name: Get ninja logs Android x64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'x64' || github.event.inputs.build == 'all') }}
shell: bash
run: |
cd $WORKSPACE
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/bromite_x64/.ninja_log >$WORKSPACE/chromium/src/out/bromite_x64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite_x64/ninja_log_trace.json
[[ "$USEGOMA" = "true" ]] && \
wget http://127.0.0.1:8088/logz?INFO -O out/bromite/goma-client.log \
|| \
echo Skipped.
- name: Generate breakpad symbols
- name: Generate breakpad symbols arm64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm64' || github.event.inputs.build == '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 +322,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') && (github.event.inputs.build == 'arm64' || github.event.inputs.build == '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.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
@ -392,66 +345,3 @@ jobs:
-t compdb cc cxx objc objcxx >$WORKSPACE/chromium/src/out/clangd/compile_commands.json && \
/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::"

138
.github/workflows/check_git_apply.yaml vendored Normal file
View File

@ -0,0 +1,138 @@
name: Check git apply
on:
workflow_dispatch:
inputs:
rtag:
description: 'uazo/bromite TAG or COMMIT'
required: true
default: ''
branch:
description: 'uazo/bromite BRANCH'
required: true
default: ''
env:
GITHUB_SHA: ${{ github.event.inputs.rtag }}
BROMITE_SHA: ${{ github.event.inputs.rtag }}
USEINTERNALNETWORK: false # CUSTOM RUNNER: create the docker network as internal
REMOVEDOCKERSUPPORT: false # CUSTOM RUNNER: remove sharing of docker socket
https_proxy: http://172.18.0.1:8118
http_proxy: http://172.18.0.1:8118
jobs:
get-git-apply:
runs-on: ci
container:
image: uazo/build-deps:latest
env:
GITHUB_SHA: ${{ github.event.inputs.rtag }}
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
REMOVEDOCKERSUPPORT: false # CUSTOM RUNNER: remove sharing of docker socket
volumes:
- /tmp/proxy:/tmp/proxy
steps:
- name: Prepare container
run: |
sudo chown lg /etc/apt/apt.conf.d/proxy.conf
sudo chown lg .
sudo echo Acquire::http::Proxy \"http://172.18.0.1:8118\"\; >/etc/apt/apt.conf.d/proxy.conf
#export HTTPS_PROXY=http://172.18.0.1:8118
#export HTTP_PROXY=http://172.18.0.1:8118
#export http_proxy=http://172.18.0.1:8118
#export https_proxy=http://172.18.0.1:8118
sudo chmod 777 /__w/_temp
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt update
sudo apt install -y wget unzip tar sed dos2unix patchutils wiggle curl nano aspnetcore-runtime-6.0
wget https://github.com/uazo/superpatch/releases/latest/download/SuperPatchUtils.tar.gz
tar xfz SuperPatchUtils.tar.gz
rm SuperPatchUtils.tar.gz
git clone https://github.com/uazo/bromite-buildtools
#wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip
#unzip pup_v0.4.0_linux_amd64.zip
#rm pup_v0.4.0_linux_amd64.zip
#BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$GITHUB_SHA | ./pup -p li.branch:last-child a text{})
test -d /github/home/.vscode-server || sudo mkdir /github/home/.vscode-server
sudo chown lg /github/home/.vscode-server
- name: Checkout 'uazo/bromite'
uses: actions/checkout@v2
with:
repository: 'uazo/bromite'
ref: ${{ github.event.inputs.rtag }}
path: 'bromite'
fetch-depth: 1
- name: Create chromium sources
run: |
#sleep 2h
VERSION=$(cat bromite/build/RELEASE)
./bin/SuperPatchUtils bromite $BROMITE_SHA chromium/src
cd chromium/src
git init
git config user.email "you@example.com"
git config user.name "Your Name"
git add .
git commit -m $VERSION
git tag -a $VERSION -m $VERSION
- name: Apply patches ${{ github.event.inputs.rtag }}
run: |
export HOME=$(pwd)
cd ~/chromium/src
export SILENT=true
export CGA_REMOTE=true
export SKIPAUTOGENERATED=true
bash ~/bromite-buildtools/apply-all-patch.sh || sleep 23h || true
rm -rf ~/bromite/build/patches-new/
rm ~/bromite/build/bromite_patches_list_new.txt
- name: Export patches
run: |
export HOME=$(pwd)
cd ~/chromium/src
bash ~/bromite-buildtools/export-all-patch.sh
cd ~/bromite
rm -rf build/patches/*
mv build/patches-new/* build/patches
rm -rf build/patches-new/
- name: Check differences CHANGES=${{ env.CHANGES }}
run: |
cd bromite
CHANGES=0 && git diff --quiet || CHANGES=1
if [[ CHANGES -eq 1 ]]; then
git add build/patches/*.patch
git diff --name-only --staged
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a #v3.12.0
with:
token: ${{ secrets.BROMITE_PULLS_PAT }}
path: bromite
base: ${{ github.event.inputs.branch }}
add-paths: |
build/patches/*.patch
commit-message: 'AUTOMATED - git apply results'
title: Git apply result for ${{ github.event.inputs.branch }} branch
body: ${{ env.MESSAGE }}
delete-branch: true
branch-suffix: short-commit-hash

View File

@ -9,36 +9,22 @@ on:
description: 'uazo/bromite SHA'
required: true
default: '0a8ff322d6e9d738f7b2fa52618b178081bd100d'
build:
description: 'arch [arm64/x64]'
required: true
default: 'arm64'
type:
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
jobs:
release:
runs-on: ${{ github.event.inputs.type }}
env:
OUTPUTFILE: /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
OUTPUTFILE_ARM64: /storage/images/android/${{ github.event.inputs.sha }}/false/arm64/
OUTPUTFILE_X64: /storage/images/android/${{ github.event.inputs.sha }}/false/x64/
steps:
- name: Prepare container
@ -48,49 +34,102 @@ 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
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
GH=gh_2.18.1_linux_amd64/bin/gh
WINOUT=/storage/images/win/x64/$BROMITE_SHA/
VERSION=v$(cat ${{ env.OUTPUTFILE_ARM64 }}/RELEASE)
# - 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.21.1_linux_amd64/bin/gh
wget https://github.com/cli/cli/releases/download/v2.21.1/gh_2.21.1_linux_amd64.tar.gz
tar xfz gh_2.21.1_linux_amd64.tar.gz
# - 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 }}
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 arm64
sudo cp ${{ env.OUTPUTFILE_ARM64 }}/apks/ChromePublic.apk arm64_ChromePublic.apk
sudo chown runner arm64_ChromePublic.apk
echo Uploading arm64_ChromePublic
$GH release upload $VERSION-$BROMITE_SHA arm64_ChromePublic.apk
# android x64
sudo cp ${{ env.OUTPUTFILE_X64 }}/apks/ChromePublic.apk x64_ChromePublic.apk
sudo chown runner x64_ChromePublic.apk
echo Uploading x64_ChromePublic
$GH release upload $VERSION-$BROMITE_SHA x64_ChromePublic.apk
echo Uploading chrome.size
test $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size && \
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size
echo Uploading arm64_ninja_log_trace.html
test $OUTPUTFILE_ARM64/ninja_log_trace.html && \
cp $OUTPUTFILE_ARM64/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.22621.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
#test chrome-win.zip && rm chrome-win.zip
zip -r chrome-win.zip chrome-win/
echo Uploading chrome-win.zip
$GH release upload $VERSION-$BROMITE_SHA chrome-win.zip
# workaround for https://github.com/cli/cli/issues/6599
sleep 30s
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

View File

@ -35,8 +35,59 @@ RUNNER_LABELS=dev
ALLOWEDAUTHORSLIST=uazo
```
5. Start the runner
5. Prepare for windows cross build
Follow the [instructions](https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/win_cross.md#if-you_re-not-at-google) to create the zip with the toolchain
example:
```
cd path\to\depot_tools\win_toolchain
D:\Downloads\depot_tools\win_toolchain> package_from_installed.py --allow_multiple_vs_installs -w 10.0.20348.0 2019
```
create the `/casefold` in the unix host with [casefold attribute](https://unix.stackexchange.com/questions/558977/how-to-enable-new-in-kernel-5-2-case-insensitivity-for-ext4-on-a-given-directory) and unzip the contents into.
```
~$ ls /casefold/10.0.20348.0/ -la
total 36
drwxr-xr-x 8 root root 4096 Oct 5 13:20 .
drwxr-xr-x 5 root root 4096 Oct 5 13:17 ..
drwxr-xr-x 6 root root 4096 Oct 5 13:19 'DIA SDK'
drwxr-xr-x 2 root root 4096 Oct 5 13:20 sys32
drwxr-xr-x 2 root root 4096 Oct 5 13:20 sys64
drwxr-xr-x 2 root root 4096 Oct 5 13:20 sysarm64
drwxr-xr-x 5 root root 4096 Oct 5 13:20 VC
-rw-rw-rw- 1 root root 5 Sep 26 17:05 VS_VERSION
drwxr-xr-x 3 root root 4096 Oct 5 13:20 'Windows Kits'
```
6. Start the runner
```
cd bromite-buildtools/images/github-runner/
./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

@ -16,6 +16,11 @@ for patch in $ALLPATCHS_E; do
if [[ "$PATCH_FILE" == *"Automated-domain-substitution"* ]]; then
continue
fi
PATCH_MESSAGE=$(git -C ~/chromium/src/ show -s $patch)
if [[ $PATCH_MESSAGE == *NOEXPORT:* ]] ;
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

View File

@ -13,6 +13,13 @@ else
echo Exporting new $patch ~/bromite/build/patches-new/$PATCH_FILE
fi
PATCH_MESSAGE=$(git -C ~/chromium/src/ show -s $patch)
if [[ $PATCH_MESSAGE == *NOEXPORT:* ]] ;
then
echo Request NO export
exit 0
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"

View File

@ -1,6 +1,12 @@
ARG BROMITE_SHA
ARG VERSION
FROM uazo/bromite:$BROMITE_SHA
FROM uazo/bromite:$VERSION-$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

View File

@ -3,46 +3,48 @@ 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") {
target_os = "android" # fix traffic annotation auditor
#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
use_relative_vtables_abi = false
}
}
if (target_os == "win") {
target_os = "win" # fix traffic annotation auditor
target_cpu = "x64"
symbol_level = 0
use_large_pdbs = true
enable_pdf = true
pdf_is_complete_lib = true
enable_plugins = true
enable_ppapi = false
is_cfi = 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
cd ninja
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}
cd $WORKSPACE/

View File

@ -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 && \

View File

@ -16,7 +16,7 @@ RUN dpkg --add-architecture i386
RUN apt-get update &&\
DEBIAN_FRONTEND=noninteractive \
apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils python sed tzdata build-essential lib32gcc-9-dev g++-multilib
apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils python sed tzdata build-essential lib32gcc-9-dev g++-multilib dos2unix wiggle
ENV user lg
@ -33,12 +33,11 @@ USER ${user}
WORKDIR /home/${user}
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 && \
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-android.sh --no-prompt
sudo ./install-build-deps.sh --android --no-prompt --no-chromeos-fonts && \
sudo mkdir -p /github/home/.vscode-server && \
sudo chown lg /github/home/.vscode-server

View File

@ -40,7 +40,7 @@ RUN apt-get update && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
apt-key fingerprint 0EBFCD88 && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
apt-get update && apt-get install --no-install-recommends -y docker-ce docker-ce-cli containerd.io=1.4.4-1 && \
apt-get update && apt-get install --no-install-recommends -y docker-ce docker-ce-cli && \
apt-get clean -y && \
rm -rf /var/cache/debconf/* /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* \
/usr/share/doc/* /usr/share/man/* /usr/share/local/* && \
@ -77,7 +77,7 @@ RUN useradd -m runner \
# Build args
ARG TARGETPLATFORM=amd64
ARG RUNNER_VERSION=2.302.5
ARG RUNNER_VERSION=2.303.1
WORKDIR /runner
# Runner download supports amd64 as x64
@ -109,6 +109,11 @@ RUN chmod +x ./patched/runsvc.sh /usr/local/bin/startup.sh
USER runner
RUN wget https://github.com/docker/buildx/releases/download/v0.10.4/buildx-v0.10.4.linux-amd64 && \
mkdir -p /home/runner/.docker/cli-plugins && \
mv buildx-v0.10.4.linux-amd64 /home/runner/.docker/cli-plugins/docker-buildx && \
chmod +x /home/runner/.docker/cli-plugins/docker-buildx
ENV HTTP_PROXY="http://127.0.0.1:8118"
ENV HTTPS_PROXY="http://127.0.0.1:8118"
ENV http_proxy="http://127.0.0.1:8118"

View File

@ -40,7 +40,7 @@ do
-v /casefold:/win_sdk \
--network none \
--device=/dev/kvm \
uazo/github-runner
uazo/github-runner:2.303.2
echo "You can stop now"
sleep 5s

View 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

View File

@ -1,19 +1,13 @@
#!/bin/bash
if [[ -z "${DOCKER_SOCK}" ]]; then
echo "Please set DOCKER_SOCK env variable"
if [[ -z "${INDEX_VERSION}" ]]; then
echo "Please set INDEX_VERSION env variable"
exit 1
fi
if [[ -z "${DEV_CONTAINER}" ]]; then
echo "Please set DEV_CONTAINER env variable"
exit 1
fi
cp /storage/images/android/x64/$INDEX_VERSION/bromite.idx .
cp /storage/images/android/x64/$INDEX_VERSION/RELEASE .
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 \
--progress plain \
--no-cache \

View File

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