Add win crossbuild
This commit is contained in:
parent
37512410b0
commit
7ce76c0224
22
.github/workflows/build_bromite_dev.yaml
vendored
22
.github/workflows/build_bromite_dev.yaml
vendored
@ -22,6 +22,10 @@ on:
|
|||||||
description: 'arch [arm64/x64]'
|
description: 'arch [arm64/x64]'
|
||||||
required: true
|
required: true
|
||||||
default: 'x64'
|
default: 'x64'
|
||||||
|
targetos:
|
||||||
|
description: 'targetos [android/win]'
|
||||||
|
required: true
|
||||||
|
default: 'android'
|
||||||
type:
|
type:
|
||||||
description: 'runner? [dev/ci]'
|
description: 'runner? [dev/ci]'
|
||||||
required: true
|
required: true
|
||||||
@ -181,14 +185,20 @@ jobs:
|
|||||||
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
|
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
|
||||||
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
|
USEINTERNALNETWORK: true # CUSTOM RUNNER: create the docker network as internal
|
||||||
WORKSPACE: /home/lg/working_dir
|
WORKSPACE: /home/lg/working_dir
|
||||||
|
# kythe
|
||||||
KYTHE_CORPUS: chromium.googlesource.com/chromium/src
|
KYTHE_CORPUS: chromium.googlesource.com/chromium/src
|
||||||
KYTHE_ROOT_DIRECTORY: /home/lg/working_dir/chromium/src
|
KYTHE_ROOT_DIRECTORY: /home/lg/working_dir/chromium/src
|
||||||
KYTHE_OUTPUT_DIRECTORY: /home/lg/working_dir/chromium/src/out/bromite/kythe
|
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/
|
||||||
# compile in debug mode
|
# compile in debug mode
|
||||||
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
|
TARGET_ISDEBUG: ${{ github.event.inputs.debug }}
|
||||||
TARGET_CPU: ${{ github.event.inputs.build }}
|
TARGET_CPU: ${{ github.event.inputs.build }}
|
||||||
|
TARGET_OS: ${{ github.event.inputs.targetos }}
|
||||||
volumes:
|
volumes:
|
||||||
- /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
- /storage/images/${{ github.event.inputs.targetos }}/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}:/home/lg/working_dir/chromium/src/out/bromite
|
||||||
- /tmp/proxy:/tmp/proxy
|
- /tmp/proxy:/tmp/proxy
|
||||||
- /win_sdk:/win_sdk
|
- /win_sdk:/win_sdk
|
||||||
|
|
||||||
@ -250,10 +260,15 @@ jobs:
|
|||||||
if [[ OUT_PRESENT -eq 0 ]]; then
|
if [[ OUT_PRESENT -eq 0 ]]; then
|
||||||
|
|
||||||
echo "::group::-------- gn gen"
|
echo "::group::-------- gn gen"
|
||||||
|
if [[ "$TARGET_OS" = "android" ]]
|
||||||
|
then
|
||||||
[[ "$USEGOMA" = "true" ]] && \
|
[[ "$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\") 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
|
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 "::endgroup::"
|
||||||
|
|
||||||
echo "::group::-------- gn args"
|
echo "::group::-------- gn args"
|
||||||
@ -295,10 +310,15 @@ jobs:
|
|||||||
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
|
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
|
cd $WORKSPACE/chromium/src
|
||||||
|
|
||||||
|
if [[ "$TARGET_OS" = "android" ]]
|
||||||
|
then
|
||||||
[[ "$USEGOMA" = "true" ]] && \
|
[[ "$USEGOMA" = "true" ]] && \
|
||||||
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk \
|
||||||
|| \
|
|| \
|
||||||
autoninja -C out/bromite chrome_public_apk
|
autoninja -C out/bromite chrome_public_apk
|
||||||
|
else
|
||||||
|
autoninja -C out/bromite chrome
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Get ninja logs
|
- name: Get ninja logs
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
Reference in New Issue
Block a user