devops: introduce chromium tip-of-tree build (#13664)
This commit is contained in:
parent
87fb841267
commit
2bf875987b
43
.github/workflows/roll_chromium_tip_of_treebuild.yml
vendored
Normal file
43
.github/workflows/roll_chromium_tip_of_treebuild.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
name: "PR: bump //browser_patches/chromium-tip-of-tree/BUILD_NUMBER"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# At 10:00am UTC (3AM PST) every tuesday and thursday to build new Chromium Tip-of-tree
|
||||||
|
- cron: "0 10 * * 2,4"
|
||||||
|
jobs:
|
||||||
|
trigger-chromium-build:
|
||||||
|
name: Trigger Build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: ./browser_patches/chromium-tip-of-tree/roll_to_current_tip_of_tree.sh
|
||||||
|
- name: Prepare branch
|
||||||
|
id: prepare-branch
|
||||||
|
run: |
|
||||||
|
if [[ "$(git status --porcelain)" == "" ]]; then
|
||||||
|
echo "there are no changes";
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
echo "::set-output name=HAS_CHANGES::1"
|
||||||
|
CURRENT_DATE=$(date +%Y-%b-%d)
|
||||||
|
BRANCH_NAME="roll-chromium/${CURRENT_DATE}"
|
||||||
|
echo "::set-output name=BRANCH_NAME::$BRANCH_NAME"
|
||||||
|
echo "::set-output name=CURRENT_DATE::$CURRENT_DATE"
|
||||||
|
git config --global user.name github-actions
|
||||||
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
git checkout -b "$BRANCH_NAME"
|
||||||
|
git add .
|
||||||
|
git commit -m "browser(chromium-tip-of-tree): roll to $CURRENT_DATE"
|
||||||
|
git push origin $BRANCH_NAME
|
||||||
|
- name: Create Pull Request
|
||||||
|
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }}
|
||||||
|
uses: actions/github-script@v4
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
await github.pulls.create({
|
||||||
|
owner: 'microsoft',
|
||||||
|
repo: 'playwright',
|
||||||
|
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
||||||
|
base: 'main',
|
||||||
|
title: 'browser(chromium-tip-of-tree): roll to ${{ steps.prepare-branch.outputs.CURRENT_DATE }}',
|
||||||
|
});
|
||||||
|
|
@ -119,6 +119,39 @@ elif [[ "$BUILD_FLAVOR" == "chromium-linux-arm64" ]]; then
|
||||||
EXPECTED_HOST_OS_VERSION="20.04"
|
EXPECTED_HOST_OS_VERSION="20.04"
|
||||||
BUILD_BLOB_NAME="chromium-linux-arm64.zip"
|
BUILD_BLOB_NAME="chromium-linux-arm64.zip"
|
||||||
|
|
||||||
|
# ===========================
|
||||||
|
# CHROMIUM-TIP-OF-TREE COMPILATION
|
||||||
|
# ===========================
|
||||||
|
elif [[ "$BUILD_FLAVOR" == "chromium-tip-of-tree-win64" ]]; then
|
||||||
|
BROWSER_NAME="chromium-tip-of-tree"
|
||||||
|
EXTRA_BUILD_ARGS="--full --goma"
|
||||||
|
EXPECTED_HOST_OS="MINGW"
|
||||||
|
BUILD_BLOB_NAME="chromium-tip-of-tree-win64.zip"
|
||||||
|
elif [[ "$BUILD_FLAVOR" == "chromium-tip-of-tree-mac" ]]; then
|
||||||
|
BROWSER_NAME="chromium-tip-of-tree"
|
||||||
|
EXTRA_BUILD_ARGS="--full --goma"
|
||||||
|
EXPECTED_HOST_OS="Darwin"
|
||||||
|
EXPECTED_HOST_OS_VERSION="12.2"
|
||||||
|
BUILD_BLOB_NAME="chromium-tip-of-tree-mac.zip"
|
||||||
|
elif [[ "$BUILD_FLAVOR" == "chromium-tip-of-tree-mac-arm64" ]]; then
|
||||||
|
BROWSER_NAME="chromium-tip-of-tree"
|
||||||
|
EXTRA_BUILD_ARGS="--arm64 --full --goma"
|
||||||
|
EXPECTED_HOST_OS="Darwin"
|
||||||
|
EXPECTED_HOST_OS_VERSION="12.2"
|
||||||
|
BUILD_BLOB_NAME="chromium-tip-of-tree-mac-arm64.zip"
|
||||||
|
elif [[ "$BUILD_FLAVOR" == "chromium-tip-of-tree-linux" ]]; then
|
||||||
|
BROWSER_NAME="chromium-tip-of-tree"
|
||||||
|
EXTRA_BUILD_ARGS="--full --goma"
|
||||||
|
EXPECTED_HOST_OS="Ubuntu"
|
||||||
|
EXPECTED_HOST_OS_VERSION="18.04"
|
||||||
|
BUILD_BLOB_NAME="chromium-tip-of-tree-linux.zip"
|
||||||
|
elif [[ "$BUILD_FLAVOR" == "chromium-tip-of-tree-linux-arm64" ]]; then
|
||||||
|
BROWSER_NAME="chromium-tip-of-tree"
|
||||||
|
EXTRA_BUILD_ARGS="--arm64 --full --goma"
|
||||||
|
EXPECTED_HOST_OS="Ubuntu"
|
||||||
|
EXPECTED_HOST_OS_VERSION="20.04"
|
||||||
|
BUILD_BLOB_NAME="chromium-tip-of-tree-linux-arm64.zip"
|
||||||
|
|
||||||
# ===========================
|
# ===========================
|
||||||
# CHROMIUM-WITH-SYMBOLS COMPILATION
|
# CHROMIUM-WITH-SYMBOLS COMPILATION
|
||||||
# ===========================
|
# ===========================
|
||||||
|
|
|
||||||
1
browser_patches/chromium-tip-of-tree/BUILD_NUMBER
Normal file
1
browser_patches/chromium-tip-of-tree/BUILD_NUMBER
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1000
|
||||||
5
browser_patches/chromium-tip-of-tree/EXPECTED_BUILDS
Normal file
5
browser_patches/chromium-tip-of-tree/EXPECTED_BUILDS
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
chromium-tip-of-tree-mac.zip
|
||||||
|
chromium-tip-of-tree-mac-arm64.zip
|
||||||
|
chromium-tip-of-tree-linux.zip
|
||||||
|
chromium-tip-of-tree-linux-arm64.zip
|
||||||
|
chromium-tip-of-tree-win64.zip
|
||||||
3
browser_patches/chromium-tip-of-tree/UPSTREAM_CONFIG.sh
Normal file
3
browser_patches/chromium-tip-of-tree/UPSTREAM_CONFIG.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# CURRENT_VERSION: 103.0.5015.0
|
||||||
|
# BRANCH_BASE_POSITION: 994112
|
||||||
|
BRANCH_COMMIT="4a39a9160f12d8e6ac06c37db137c49682c6db5a"
|
||||||
9
browser_patches/chromium-tip-of-tree/archive.sh
Executable file
9
browser_patches/chromium-tip-of-tree/archive.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set +x
|
||||||
|
|
||||||
|
trap "cd $(pwd -P)" EXIT
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
SCRIPT_FOLDER=$(pwd -P)
|
||||||
|
|
||||||
|
bash "../chromium/archive.sh" "$@"
|
||||||
9
browser_patches/chromium-tip-of-tree/build.sh
Executable file
9
browser_patches/chromium-tip-of-tree/build.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set +x
|
||||||
|
|
||||||
|
trap "cd $(pwd -P)" EXIT
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
SCRIPT_FOLDER=$(pwd -P)
|
||||||
|
|
||||||
|
bash "../chromium/build.sh" "$@"
|
||||||
9
browser_patches/chromium-tip-of-tree/clean.sh
Executable file
9
browser_patches/chromium-tip-of-tree/clean.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set +x
|
||||||
|
|
||||||
|
trap "cd $(pwd -P)" EXIT
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
SCRIPT_FOLDER=$(pwd -P)
|
||||||
|
|
||||||
|
bash "../chromium/clean.sh" "$@"
|
||||||
32
browser_patches/chromium-tip-of-tree/roll_to_current_tip_of_tree.sh
Executable file
32
browser_patches/chromium-tip-of-tree/roll_to_current_tip_of_tree.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set +x
|
||||||
|
|
||||||
|
trap "cd $(pwd -P)" EXIT
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
SCRIPT_FOLDER=$(pwd -P)
|
||||||
|
|
||||||
|
# 1. get current version
|
||||||
|
CURRENT_BETA_VERSION=$(curl https://omahaproxy.appspot.com/all | grep "win64,canary," | cut -d ',' -f 3)
|
||||||
|
VERSION_INFO_JSON=$(curl "https://omahaproxy.appspot.com/deps.json?version=$CURRENT_BETA_VERSION")
|
||||||
|
|
||||||
|
NODE_SCRIPT=$(cat <<EOF
|
||||||
|
const json = JSON.parse(fs.readFileSync(0));
|
||||||
|
console.log([
|
||||||
|
'# CURRENT_VERSION: ' + json.chromium_version,
|
||||||
|
'# BRANCH_BASE_POSITION: ' + json.chromium_base_position,
|
||||||
|
'BRANCH_COMMIT="' + json.chromium_base_commit + '"',
|
||||||
|
].join('\n'));
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
NEW_CONFIG=$(echo "${VERSION_INFO_JSON}" | node -e "${NODE_SCRIPT}")
|
||||||
|
CURRENT_CONFIG=$(cat "${SCRIPT_FOLDER}/UPSTREAM_CONFIG.sh")
|
||||||
|
|
||||||
|
if [[ "${CURRENT_CONFIG}" == "${NEW_CONFIG}" ]]; then
|
||||||
|
echo "No changes!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${NEW_CONFIG}" > "${SCRIPT_FOLDER}/UPSTREAM_CONFIG.sh"
|
||||||
|
BUILD_NUMBER=$(cat "${SCRIPT_FOLDER}/BUILD_NUMBER")
|
||||||
|
echo $(( $BUILD_NUMBER + 1 )) > "${SCRIPT_FOLDER}/BUILD_NUMBER"
|
||||||
|
|
@ -39,7 +39,14 @@ function maybe_cmd {
|
||||||
function prepare_chromium_checkout {
|
function prepare_chromium_checkout {
|
||||||
cd "${SCRIPT_PATH}"
|
cd "${SCRIPT_PATH}"
|
||||||
|
|
||||||
source "${SCRIPT_PATH}/chromium/UPSTREAM_CONFIG.sh"
|
if [[ $1 == "chromium" ]]; then
|
||||||
|
source "${SCRIPT_PATH}/chromium/UPSTREAM_CONFIG.sh"
|
||||||
|
elif [[ "$1" == "chromium-tot" ]]; then
|
||||||
|
source "${SCRIPT_PATH}/chromium-tip-of-tree/UPSTREAM_CONFIG.sh"
|
||||||
|
else
|
||||||
|
echo "ERROR: unknown type of checkout to prepare - $1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
source "${SCRIPT_PATH}/chromium/ensure_depot_tools.sh"
|
source "${SCRIPT_PATH}/chromium/ensure_depot_tools.sh"
|
||||||
|
|
||||||
if [[ -z "${CR_CHECKOUT_PATH}" ]]; then
|
if [[ -z "${CR_CHECKOUT_PATH}" ]]; then
|
||||||
|
|
@ -80,7 +87,10 @@ BUILD_NUMBER=""
|
||||||
WEBKIT_EXTRA_FOLDER_PATH=""
|
WEBKIT_EXTRA_FOLDER_PATH=""
|
||||||
FIREFOX_EXTRA_FOLDER_PATH=""
|
FIREFOX_EXTRA_FOLDER_PATH=""
|
||||||
if [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then
|
if [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then
|
||||||
prepare_chromium_checkout
|
prepare_chromium_checkout chromium
|
||||||
|
exit 0
|
||||||
|
elif [[ ("$1" == "chromium-tip-of-tree") || ("$1" == "chromium-tot") || ("$1" == "cr-tot") ]]; then
|
||||||
|
prepare_chromium_checkout chromium-tot
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ ("$1" == "ffmpeg") || ("$1" == "ffmpeg/") ]]; then
|
elif [[ ("$1" == "ffmpeg") || ("$1" == "ffmpeg/") ]]; then
|
||||||
echo "FYI: ffmpeg checkout is not supported. Use '//browser_patches/ffmpeg/build.sh' instead"
|
echo "FYI: ffmpeg checkout is not supported. Use '//browser_patches/ffmpeg/build.sh' instead"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue