Remove Travis configuration from flutter/flutter (#20288)

This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
This commit is contained in:
Greg Spencer
2018-08-07 13:41:33 -07:00
committed by GitHub
parent b0046b1811
commit e60087a1a7
19 changed files with 55 additions and 251 deletions

View File

@@ -3,16 +3,22 @@
This directory exists to support building Flutter on our build infrastructure.
The results of such builds are viewable at:
* https://cirrus-ci.com/github/flutter/flutter/master
- Testing done on PRs and submitted changes on GitHub.
* https://build.chromium.org/p/client.flutter/console
* https://travis-ci.org/flutter/flutter/builds (limited checking used just for PRs on github)
- Additional testing and processing done after changes are submitted.
The external master pages for the chromium infra bots do not allow
The external master pages for the Chromium infra bots do not allow
forcing new builds. Contact @eseidelGoogle or another member of
Google's Flutter team if you need to do that.
The Travis-based bots are trivial, and just run a couple of shell
scripts. The rest of this document discusses only the chromium infra
bots.
The [Cirrus](https://cirrus-ci.org)-based bots run the [`test.dart`](test.dart)
script for each PR and submission. It does testing for the tools, for the
framework, and (for submitted changes only) rebuilds and updates the master
branch API docs staging site. For tagged dev and beta builds, it also builds and
deploys the gallery app to the app stores.
The rest of this document discusses only the Chromium infra bots.
This infrastructure is broken into two parts. A buildbot master specified by our
[builders.pyl](https://chromium.googlesource.com/chromium/tools/build.git/+/master/masters/master.client.flutter/builders.pyl)

View File

@@ -75,7 +75,7 @@ fi
# Ensure google webmaster tools can verify our site.
cp "$FLUTTER_ROOT/dev/docs/google2ed1af765c529f57.html" "$FLUTTER_ROOT/dev/docs/doc"
# Upload new API docs when on Travis
# Upload new API docs when running on Cirrus
if [[ -n "$CIRRUS_CI" && -z "$CIRRUS_PR" ]]; then
echo "This is not a pull request; considering whether to upload docs... (branch=$CIRRUS_BRANCH)"
if [[ "$CIRRUS_BRANCH" == "master" || "$CIRRUS_BRANCH" == "beta" ]]; then

View File

@@ -33,8 +33,8 @@ const Map<String, ShardRunner> _kShards = <String, ShardRunner>{
'tests': _runTests,
'tool_tests': _runToolTests,
'coverage': _runCoverage,
// 'docs': handled by travis_script.sh and docs.sh
// 'build_and_deploy_gallery': handled by travis_script.sh
// 'docs': handled by docs.sh
// 'build_and_deploy_gallery': handled by deploy_gallery.sh
};
const Duration _kLongTimeout = Duration(minutes: 45);

View File

@@ -1,25 +0,0 @@
#!/bin/bash
set -ex
function retry {
local total_tries=$1
local remaining_tries=$total_tries
shift
while [ $remaining_tries -gt 0 ]; do
"$@" && break
remaining_tries=$(($remaining_tries - 1))
sleep 5
done
[ $remaining_tries -eq 0 ] && {
echo "Command still failed after $total_tries tries: $@"
return 1
}
return 0
}
if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
gem install coveralls-lcov
gem install bundler
retry 5 npm install -g firebase-tools@">=3.6.1 <3.7.0"
fi

View File

@@ -1,63 +0,0 @@
#!/bin/bash
set -ex
export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"
if [ "$SHARD" = "build_and_deploy_gallery" ]; then
version=$(<version)
echo "Building and deploying Flutter Gallery $version"
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
echo "Building Flutter Gallery for Android..."
export ANDROID_HOME=`pwd`/android-sdk
(
cd examples/flutter_gallery
flutter build apk --release -t lib/main_publish.dart
)
echo "Android Flutter Gallery built"
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "dev" && $version != *"pre"* ]]; then
echo "Deploying to Play Store..."
(
cd examples/flutter_gallery/android
bundle install
bundle exec fastlane deploy_play_store
)
else
echo "Flutter Gallery is only deployed to the Play Store on merged and tagged dev branch commits"
fi
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
echo "Building Flutter Gallery for iOS..."
(
cd examples/flutter_gallery
flutter build ios --release --no-codesign -t lib/main_publish.dart
)
echo "iOS Flutter Gallery built"
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
if [[ "$TRAVIS_BRANCH" == "dev" && $version != *"pre"* ]]; then
echo "Archiving with distribution profile and deploying to TestFlight..."
(
cd examples/flutter_gallery/ios
bundle install
bundle exec fastlane build_and_deploy_testflight upload:true
)
else
echo "Archiving with distribution profile..."
(
cd examples/flutter_gallery/ios
bundle install
bundle exec fastlane build_and_deploy_testflight
)
echo "Archive is only deployed to TestFlight on tagged dev branch commits"
fi
else
echo "Flutter Gallery is only deployed to the TestFlight on merged and tagged dev branch commits"
fi
fi
elif [ "$SHARD" = "docs" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Generate the API docs, upload them
./dev/bots/docs.sh
fi
else
TEST_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE}" dart ./dev/bots/test.dart
fi

View File

@@ -1,63 +0,0 @@
#!/bin/bash
set -e
echo $KEY_FILE | base64 --decode > ../gcloud_key_file.json
set -x
if [ -n "$TRAVIS" ]; then
# Only used to upload docs. Don't install gcloud SDK otherwise.
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$SHARD" = "docs" ]; then
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
echo "Installing Google Cloud SDK..."
curl https://sdk.cloud.google.com | bash > /dev/null
echo "Google Cloud SDK installation completed."
fi
# Android SDK only needed to build the gallery on build_and_deploy_gallery Linux shard.
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$SHARD" = "build_and_deploy_gallery" ]; then
# Background for not using Travis's built-in Android tags
# https://github.com/flutter/plugins/pull/145
# Copied from https://github.com/flutter/plugins/blame/master/.travis.yml
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
mkdir android-sdk
unzip -qq sdk-tools-linux-3859397.zip -d android-sdk
export ANDROID_HOME=`pwd`/android-sdk
export PATH=`pwd`/android-sdk/tools/bin:$PATH
mkdir -p /home/travis/.android # silence sdkmanager warning
set +x # Travis's env variable hiding is a bit wonky. Don't echo back this line.
if [ -n "$ANDROID_GALLERY_UPLOAD_KEY" ]; then
echo "$ANDROID_GALLERY_UPLOAD_KEY" | base64 --decode > /home/travis/.android/debug.keystore
fi
set -x
echo 'count=0' > /home/travis/.android/repositories.cfg # silence sdkmanager warning
# suppressing output of sdkmanager to keep log under 4MB (travis limit)
echo y | sdkmanager "tools" >/dev/null
echo y | sdkmanager "platform-tools" >/dev/null
echo y | sdkmanager "build-tools;27.0.3" >/dev/null
echo y | sdkmanager "platforms;android-27" >/dev/null
echo y | sdkmanager "extras;android;m2repository" >/dev/null
echo y | sdkmanager "extras;google;m2repository" >/dev/null
echo y | sdkmanager "patcher;v4" >/dev/null
sdkmanager --list
wget http://services.gradle.org/distributions/gradle-4.4-bin.zip
unzip -qq gradle-4.4-bin.zip
export GRADLE_HOME=$PWD/gradle-4.4
export PATH=$GRADLE_HOME/bin:$PATH
gradle -v
./bin/flutter doctor
fi
fi
# rename the SDK directory to include a space
echo "Renaming Flutter checkout directory to 'flutter sdk'"
cd ..
mv flutter flutter\ sdk
cd flutter\ sdk
echo "SDK directory is: $PWD"
# disable analytics on the bots and download Flutter dependencies
./bin/flutter config --no-analytics
# run pub get in all the repo packages
./bin/flutter update-packages

View File

@@ -64,7 +64,7 @@ Legend:
![Task status legend](images/legend.png)
The example below shows that commit `e122d5d` caused a wide-spread breakage,
which was fixed by `bdc6f10`. It also shows that Travis, AppVeyor and Chrome
which was fixed by `bdc6f10`. It also shows that Cirrus and Chrome
Infra (left-most tasks) decided to skip building these commits. Hovering over
a cell will pop up a tooltip containing the name of the broken task. Clicking
on the cell will open the log file in a new browser tab (only visible to core
@@ -75,9 +75,9 @@ contributors as of today).
## Why is a task stuck on "new task" status?
The dashboard aggregates build results from multiple build environments,
including Travis, AppVeyor, Chrome Infra, and devicelab. While devicelab
including Cirrus, Chrome Infra, and devicelab. While devicelab
tests every commit that goes into the `master` branch, other environments
may skip some commits. For example, Travis and AppVeyor will only test the
may skip some commits. For example, Cirrus will only test the
_last_ commit of a PR that's merged into the `master` branch. Chrome Infra may
skip commits when they come in too fast.

View File

@@ -17,7 +17,7 @@
# * stage: one of "devicelab", "devicelab_ios", "devicelab_win"
# tasks are grouped by stage so they appear next to each on the dashboard and have a distinct
# icon attached to them. Stages can be used to create dependencies, e.g. we may decide to not
# run device tests on red Travis.
# run device tests on red Cirrus builds.
# * required_agent_capabilities: a list of strings
# list of capabilities a devicelab agent must have to be able to run this task.
#