Remove deprecated scripts from engine. (flutter/engine#29365)

This commit is contained in:
godofredoc
2021-10-27 14:13:01 -07:00
committed by GitHub
parent 2199e274b1
commit 3a18b736aa
2 changed files with 0 additions and 120 deletions

View File

@@ -1,52 +0,0 @@
#!/bin/bash
#
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
# Needed because if it is set, cd may print the path it changed to.
unset CDPATH
# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one
# link at a time, and then cds into the link destination and find out where it
# ends up.
#
# The function is enclosed in a subshell to avoid changing the working directory
# of the caller.
function follow_links() (
cd -P "$(dirname -- "$1")"
file="$PWD/$(basename -- "$1")"
while [[ -h "$file" ]]; do
cd -P "$(dirname -- "$file")"
file="$(readlink -- "$file")"
cd -P "$(dirname -- "$file")"
file="$PWD/$(basename -- "$file")"
done
echo "$file"
)
SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")")
FLUTTER_DIR="$(cd "$SCRIPT_DIR/.."; pwd -P)"
cd "$FLUTTER_DIR"
if git remote get-url upstream >/dev/null 2>&1; then
UPSTREAM=upstream/master
else
UPSTREAM=master
fi;
FLUTTER_VERSION="$(curl -s https://raw.githubusercontent.com/flutter/flutter/master/bin/internal/engine.version)"
BEHIND="$(git rev-list "$FLUTTER_VERSION".."$UPSTREAM" --oneline | wc -l)"
MAX_BEHIND=16 # no more than 4 bisections to identify the issue
if [[ $BEHIND -le $MAX_BEHIND ]]; then
echo "OK, the flutter/engine to flutter/flutter roll is only $BEHIND commits behind."
else
echo "ERROR: The flutter/engine to flutter/flutter roll is $BEHIND commits behind!"
echo " It exceeds our max allowance of $MAX_BEHIND. Unless that this commit fixes the roll,"
echo " please roll engine into flutter first before merging more commits into engine."
exit 1
fi

View File

@@ -1,68 +0,0 @@
# The following powershell script prepares the VM image
# flutter-engine-windows-server-2016 used by Flutter engine's
# build_windows presubmit tests (see .cirrus.yml).
#
# The exact step of generating the VM image is:
# 1. Create a "Windows Server 2016 Datacenter Core" GCE instance with 50GB disk
# 2. RDP into that GCE instance to run this script with powershell
# (e.g., `powershell -File prepare_windows_server_2016_core.ps1`)
# 3. Shutdown the instance and take an image of that instance
#
# Note that ` is the escape character in powershell.
# Install visual studio 2017
curl https://aka.ms/vs/15/release/vs_community.exe -o vs_community.exe
./vs_community.exe --passive --wait `
--add Microsoft.VisualStudio.Workload.NativeCrossPlat `
--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended
# Install debugger tools
curl https://download.microsoft.com/download/5/C/3/5C3770A3-12B4-4DB4-BAE7-99C624EB32AD/windowssdk/winsdksetup.exe `
-o winsdksetup.exe
./winsdksetup.exe /features OptionId.WindowsDesktopDebuggers /q
# Download depot tools
curl https://storage.googleapis.com/chrome-infra/depot_tools.zip `
-o depot_tools.zip
Expand-Archive -LiteralPath depot_tools.zip -DestinationPath c:/depot_tools
# Download git. Although depot_tools has its own git.bat, this is needed for
# Flutter engine's gn to run correctly.
#
# Somehow, curl can't get the MinGit from github. Fortunately, taobo works.
curl https://npm.taobao.org/mirrors/git-for-windows/v2.21.0.windows.1/MinGit-2.21.0-64-bit.zip `
-o MinGit.zip
Expand-Archive -LiteralPath MinGit.zip -DestinationPath c:/MinGit
# Restarting the terminal (or even the whole VM) is required to let following
# environment variables to take effect.
setx path "c:/depot_tools/;c:/MinGit/cmd;${env:path}"
setx DEPOT_TOOLS_WIN_TOOLCHAIN 0
setx GYP_MSVS_OVERRIDE_PATH "c:/Program Files (x86)/Microsoft Visual Studio/2017/Community"
mkdir c:/flutter/engine
curl https://raw.githubusercontent.com/flutter/engine/main/ci/docker/build/engine_gclient `
-o c:/flutter/engine/.gclient
# Once the above script finishes successfully, one can make an image of the VM
# for the CI test.
#
# For sanity check, one can also test the VM to make sure that Flutter engine
# can be built in that VM. (The test is optional and our current image is made
# before doing these tests. We only did a reboot before making that image to
# ensure environment variables are loaded. However, Cirrus CI seems to have
# problems reading those environment variables so we ended up setting them in
# ".cirrus.yml" manually.)
#
# To test, first reboot of the terminal (or VM) to ensure that environment
# variables "path", "DEPOT_TOOLS_WIN_TOOLCHAIN", and "GYP_MSVS_OVERRIDE_PATH"
# are set. (Those environment variables are not needed for Cirrus CI as Cirrus
# sets those environment variables by itself.)
#
# After all the environment variables above are loaded correctly, one may test
# build the engine by:
# cd c:/flutter/engine
# gclient sync
# cd src
# python flutter/tools/gn
# ninja -C out/host_debug