Skip to content

Commit

Permalink
fix build directories
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Oct 10, 2023
1 parent aa6b41f commit 51ed1ab
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 86 deletions.
110 changes: 55 additions & 55 deletions .github/workflows/build_cromite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
# kythe
KYTHE_CORPUS: chromium.googlesource.com/chromium/src
KYTHE_ROOT_DIRECTORY: /home/lg/working_dir/chromium/src
KYTHE_OUTPUT_DIRECTORY: /home/lg/working_dir/chromium/src/out/bromite-android-arm/kythe
KYTHE_OUTPUT_DIRECTORY: /home/lg/working_dir/chromium/src/out/arm64/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/"
Expand All @@ -175,10 +175,10 @@ jobs:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
CROMITE_PREF_HASH_SEED_BIN: ${{ secrets.CROMITE_PREF_HASH_SEED_BIN }}
volumes:
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/arm:/home/lg/working_dir/chromium/src/out/bromite-android-arm
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/arm64:/home/lg/working_dir/chromium/src/out/bromite-android-arm64
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/x64:/home/lg/working_dir/chromium/src/out/bromite-android-x86_64
- /storage/images/${{ github.event.inputs.sha }}/win/x64:/home/lg/working_dir/chromium/src/out/bromite-windows-x86_64
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/arm:/home/lg/working_dir/chromium/src/out/arm
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/arm64:/home/lg/working_dir/chromium/src/out/arm64
- /storage/images/${{ github.event.inputs.sha }}/android/${{ github.event.inputs.debug }}/x64:/home/lg/working_dir/chromium/src/out/x64
- /storage/images/${{ github.event.inputs.sha }}/win/x64:/home/lg/working_dir/chromium/src/out/win64
- /tmp/proxy:/tmp/proxy
- /win_sdk:/win_sdk

Expand All @@ -197,21 +197,21 @@ jobs:
https_proxy=
# set out folder permissions
test -d chromium/src/out/bromite-android-arm || sudo mkdir -p chromium/src/out/bromite-android-arm && \
test -d chromium/src/out/arm || sudo mkdir -p chromium/src/out/arm && \
sudo chown lg chromium/src/out &&
sudo chown lg chromium/src/out/bromite-android-arm
sudo chown lg chromium/src/out/arm
test -d chromium/src/out/bromite-android-arm64 || sudo mkdir -p chromium/src/out/bromite-android-arm64 && \
test -d chromium/src/out/arm64 || sudo mkdir -p chromium/src/out/arm64 && \
sudo chown lg chromium/src/out &&
sudo chown lg chromium/src/out/bromite-android-arm64
sudo chown lg chromium/src/out/arm64
test -d chromium/src/out/bromite-windows-x86_64 || sudo mkdir -p chromium/src/out/bromite-windows-x86_64 && \
test -d chromium/src/out/win64 || sudo mkdir -p chromium/src/out/win64 && \
sudo chown lg chromium/src/out &&
sudo chown lg chromium/src/out/bromite-windows-x86_64
sudo chown lg chromium/src/out/win64
test -d chromium/src/out/bromite-android-x86_64 || sudo mkdir -p chromium/src/out/bromite-android-x86_64 && \
test -d chromium/src/out/x64 || sudo mkdir -p chromium/src/out/x64 && \
sudo chown lg chromium/src/out &&
sudo chown lg chromium/src/out/bromite-android-x86_64
sudo chown lg chromium/src/out/x64
# make kythe output directory
test -d $KYTHE_OUTPUT_DIRECTORY || mkdir -p $KYTHE_OUTPUT_DIRECTORY
Expand All @@ -236,81 +236,81 @@ jobs:
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-android-arm64
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"arm64\" " out/arm64
echo "::endgroup::"
echo "::group::-------- gn args"
gn args out/bromite-android-arm64/ --list --short
gn args out/bromite-android-arm64/ --list >out/bromite-android-arm64/gn_list
gn args out/arm64/ --list --short
gn args out/arm64/ --list >out/arm64/gn_list
echo "::endgroup::"
ninja -C out/bromite-android-arm64 chrome_public_apk
ninja -C out/arm64 chrome_public_apk
cp ../../bromite/build/RELEASE out/bromite-android-arm64
cp ../../bromite/build/RELEASE out/arm64
- 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-android-arm64/.ninja_log >$WORKSPACE/chromium/src/out/bromite-android-arm64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite-android-arm64/ninja_log_trace.json
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/arm64/.ninja_log >$WORKSPACE/chromium/src/out/arm64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/arm64/ninja_log_trace.json
- name: Build Bromite Windows x86_64
- name: Build Bromite Windows x64
if: ${{ github.event.inputs.target_os == 'win' || 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\") target_os = \"win\" $(cat ../../build_args.gni) target_cpu = \"x64\" " out/bromite-windows-x86_64
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_os = \"win\" $(cat ../../build_args.gni) target_cpu = \"x64\" " out/win64
echo "::endgroup::"
echo "::group::-------- gn args"
gn args out/bromite-windows-x86_64/ --list --short
gn args out/bromite-windows-x86_64/ --list >out/bromite-windows-x86_64/gn_list
gn args out/win64/ --list --short
gn args out/win64/ --list >out/win64/gn_list
echo "::endgroup::"
ninja -C out/bromite-windows-x86_64 chrome
ninja -C out/win64 chrome
cp ../../bromite/build/RELEASE out/bromite-windows-x86_64
cp ../../bromite/build/RELEASE out/win64
- name: Get ninja logs Windows x86_64
- name: Get ninja logs Windows x64
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-windows-x86_64/.ninja_log >$WORKSPACE/chromium/src/out/bromite-windows-x86_64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite-windows-x86_64/ninja_log_trace.json
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/win64/.ninja_log >$WORKSPACE/chromium/src/out/win64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/win64/ninja_log_trace.json
- name: Build Bromite Android x86_64
- 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-android-x86_64
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"x64\" " out/x64
echo "::endgroup::"
echo "::group::-------- gn args"
gn args out/bromite-android-x86_64/ --list --short
gn args out/bromite-android-x86_64/ --list >out/bromite-android-x86_64/gn_list
gn args out/x64/ --list --short
gn args out/x64/ --list >out/x64/gn_list
echo "::endgroup::"
ninja -C out/bromite-android-x86_64 chrome_public_apk
ninja -C out/x64 chrome_public_apk
cp ../../bromite/build/RELEASE out/bromite-android-x86_64
cp ../../bromite/build/RELEASE out/x64
- name: Get ninja logs Android x86_64
- 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-android-x86_64/.ninja_log >$WORKSPACE/chromium/src/out/bromite-android-x86_64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite-android-x86_64/ninja_log_trace.json
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/x64/.ninja_log >$WORKSPACE/chromium/src/out/x64/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/x64/ninja_log_trace.json
- name: Generate breakpad symbols for 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') }}
Expand All @@ -320,13 +320,13 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- generating breakpad symbols"
ninja -C out/bromite-android-arm64 minidump_stackwalk dump_syms
components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/bromite-android-arm64 \
--symbols-dir=out/bromite-android-arm64/symbols/ --binary=out/bromite-android-arm64/lib.unstripped/libchrome.so \
ninja -C out/arm64 minidump_stackwalk dump_syms
components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/arm64 \
--symbols-dir=out/arm64/symbols/ --binary=out/arm64/lib.unstripped/libchrome.so \
--platform=android --clear --verbose
cp out/bromite-android-arm64/lib.unstripped/libchrome.so out/bromite-android-arm64/symbols/libchrome.lib.so
cp out/bromite-android-arm64/minidump_stackwalk out/bromite-android-arm64/symbols
cp out/bromite-android-arm64/dump_syms out/bromite-android-arm64/symbols
cp out/arm64/lib.unstripped/libchrome.so out/arm64/symbols/libchrome.lib.so
cp out/arm64/minidump_stackwalk out/arm64/symbols
cp out/arm64/dump_syms out/arm64/symbols
echo "::endgroup::"
- name: Generate Supersize data for Android arm64
Expand All @@ -336,7 +336,7 @@ 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
tools/binary_size/supersize archive out/bromite-android-arm64/chrome.size --apk-file out/bromite-android-arm64/apks/ChromePublic.apk -v
tools/binary_size/supersize archive out/arm64/chrome.size --apk-file out/arm64/apks/ChromePublic.apk -v
- name: Build Bromite Android arm
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm' || github.event.inputs.build == 'all') }}
Expand All @@ -346,25 +346,25 @@ jobs:
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 = \"arm\" " out/bromite-android-arm
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"arm\" " out/arm
echo "::endgroup::"
echo "::group::-------- gn args"
gn args out/bromite-android-arm/ --list --short
gn args out/bromite-android-arm/ --list >out/bromite-android-arm/gn_list
gn args out/arm/ --list --short
gn args out/arm/ --list >out/arm/gn_list
echo "::endgroup::"
ninja -C out/bromite-android-arm chrome_public_apk
ninja -C out/arm chrome_public_apk
cp ../../bromite/build/RELEASE out/bromite-android-arm
cp ../../bromite/build/RELEASE out/arm
- name: Get ninja logs Android arm
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm' || github.event.inputs.build == 'all') }}
shell: bash
run: |
cd $WORKSPACE
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/bromite-android-arm/.ninja_log >$WORKSPACE/chromium/src/out/bromite-android-arm/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite-android-arm/ninja_log_trace.json
$WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/arm/.ninja_log >$WORKSPACE/chromium/src/out/arm/ninja_log_trace.json
python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/arm/ninja_log_trace.json
- name: Generate clangd index for Android arm64
if: ${{ github.event.inputs.clangd == 'true' }}
Expand All @@ -373,10 +373,10 @@ 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
test -f out/bromite-android-arm64/bromite.idx || \
cp -r out/bromite-android-arm64 out/clangd && \
test -f out/arm64/bromite.idx || \
cp -r out/arm64 out/clangd && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) skip_clangd_unsupported_options = true" out/clangd && \
$WORKSPACE/ninja/ninja -C $WORKSPACE/chromium/src/out/clangd -a chrome_public_apk \
-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-android-arm64/bromite.idx && \
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/clangd/compile_commands.json >out/arm64/bromite.idx && \
rm -rf out/clangd
Loading

0 comments on commit 51ed1ab

Please sign in to comment.