add inputs.usegoma

This commit is contained in:
uazo 2021-09-15 12:17:07 +02:00 committed by GitHub
parent 81bc1e9c2e
commit d842577e61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,10 @@ on:
description: 'uazo/bromite SHA'
required: true
default: '76745fde6ed75542f005ea5528f486df41c56da4'
usegoma:
description: 'Use goma?'
required: true
default: 'true'
env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
@ -203,10 +207,12 @@ jobs:
export GOMA_ARBITRARY_TOOLCHAIN_SUPPORT=true
# start goma client
echo "::group::-------- start goma client"
$WORKSPACE/goma/goma_ctl.py ensure_stop
$WORKSPACE/goma/goma_ctl.py ensure_start
echo "::endgroup::"
[[ "${{ inputs.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
@ -221,7 +227,11 @@ jobs:
echo "::endgroup::"
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/GN_ARGS\") use_goma=true goma_dir=\"$WORKSPACE/goma\" $(cat ../../build_args.gni) " out/bromite
[[ "${{ inputs.usegoma }}" = true ]] && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/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/GN_ARGS\") $(cat ../../build_args.gni) " out/bromite \
echo "::endgroup::"
echo "::group::-------- gn args"
@ -241,15 +251,17 @@ jobs:
GOMAJOBS=40
fi
echo "::group::-------- pre-cache toolchain"
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
echo "::endgroup::"
[[ "${{ inputs.usegoma }}" = true ]] && \
echo "::group::-------- pre-cache toolchain" && \
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 && \
echo "::endgroup::"
|| true
- name: Build Bromite
shell: bash
@ -257,10 +269,14 @@ jobs:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk
[[ "${{ inputs.usegoma }}" = true ]] && \
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|| \
autoninja -C out/bromite chrome_public_apk ||
- name: Get goma logs
shell: bash
if: ${{ inputs.usegoma }} = true
run: |
# reset proxy env
HTTP_PROXY=
@ -344,6 +360,7 @@ jobs:
- name: Stop goma
shell: bash
if: ${{ inputs.usegoma }} = true
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