Compare commits

..

No commits in common. "master" and "uazo-patch-1" have entirely different histories.

5 changed files with 52 additions and 88 deletions

View File

@ -23,17 +23,17 @@ on:
required: true
default: 'all'
build:
description: 'android arch [arm64/x64/all]'
description: 'android arch [arm64/x64]'
required: true
default: 'all'
default: 'x64'
type:
description: 'runner? [dev/ci]'
required: true
default: 'ci'
default: 'dev'
debug:
description: 'debug? [true/false]'
required: true
default: 'false'
default: 'true'
clangd:
description: 'clangd? [true/false]'
required: true
@ -158,7 +158,7 @@ jobs:
runs-on: ${{ github.event.inputs.type }}
needs: check_images
if: success()
timeout-minutes: 1200
timeout-minutes: 720
container:
image: uazo/bromite-build:build
@ -172,15 +172,15 @@ 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.22621.0/
WINDOWSSDKDIR: "/win_sdk/10.0.22621.0/Windows Kits/10/"
GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.22621.0/
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: /win_sdk/10.0.20348.0/
WINDOWSSDKDIR: "/win_sdk/10.0.20348.0/Windows Kits/10/"
GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.20348.0/
# compile in debug mode
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
TARGET_CPU: ${{ github.event.inputs.build }}
TARGET_OS: ${{ github.event.inputs.target_os }}
volumes:
- /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/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
@ -208,10 +208,6 @@ jobs:
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
@ -220,15 +216,15 @@ jobs:
sudo chmod g-rxw /run/user/1000/
sudo chmod o-rxw /run/user/1000/
- 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') }}
- 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
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
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"
@ -240,8 +236,8 @@ jobs:
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') }}
- name: Get ninja logs Android
if: ${{ github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all' }}
shell: bash
run: |
cd $WORKSPACE
@ -276,37 +272,8 @@ jobs:
$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
- 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') }}
- 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
@ -323,7 +290,7 @@ jobs:
echo "::endgroup::"
- 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') }}
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
@ -332,7 +299,7 @@ jobs:
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.clangd == '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
@ -345,3 +312,5 @@ 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

View File

@ -9,6 +9,10 @@ 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
@ -18,13 +22,14 @@ env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
REMOVEDOCKERSUPPORT: true
USELOCALIMAGE: true
GOMAJOBS: 60
jobs:
release:
runs-on: ${{ github.event.inputs.type }}
env:
OUTPUTFILE_ARM64: /storage/images/android/${{ github.event.inputs.sha }}/false/arm64/
OUTPUTFILE_X64: /storage/images/android/${{ github.event.inputs.sha }}/false/x64/
OUTPUTFILE: /storage/images/android/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
steps:
- name: Prepare container
@ -49,7 +54,7 @@ jobs:
run: |
GH=gh_2.18.1_linux_amd64/bin/gh
WINOUT=/storage/images/win/x64/$BROMITE_SHA/
VERSION=v$(cat ${{ env.OUTPUTFILE_ARM64 }}/RELEASE)
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
cd bromite
@ -66,25 +71,20 @@ jobs:
$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
# 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
test $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size && \
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size
test $VERSION-$BROMITE_SHA $OUTPUTFILE/chrome.size && \
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE/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 && \
test $OUTPUTFILE/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
@ -98,7 +98,7 @@ jobs:
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 "/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/

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 && \
apt-get update && apt-get install --no-install-recommends -y docker-ce docker-ce-cli containerd.io=1.4.4-1 && \
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.303.1
ARG RUNNER_VERSION=2.302.5
WORKDIR /runner
# Runner download supports amd64 as x64
@ -109,15 +109,10 @@ 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"
ENV https_proxy="http://127.0.0.1:8118"
ENV HTTP_PROXY="http://172.18.0.1:8118"
ENV HTTPS_PROXY="http://172.18.0.1:8118"
ENV http_proxy="http://172.18.0.1:8118"
ENV https_proxy="http://172.18.0.1:8118"
COPY docker.default /etc/default/docker
COPY proxy.conf /etc/apt/apt.conf.d/proxy.conf

View File

@ -1 +1 @@
Acquire::http::Proxy "http://127.0.0.1:8118";
Acquire::http::Proxy "http://172.18.0.1:8118";

View File

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