Skip to content

Commit

Permalink
Remove Travis configuration from flutter/flutter (flutter#20288)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gspencergoog authored Aug 7, 2018
1 parent b0046b1 commit e60087a
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 251 deletions.
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributing to Flutter
=======================

[![Build Status](https://travis-ci.org/flutter/flutter.svg)](https://travis-ci.org/flutter/flutter)
[![Build Status](https://api.cirrus-ci.com/github/flutter/flutter.svg)](https://cirrus-ci.org/flutter/flutter)

_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_

Expand Down Expand Up @@ -129,7 +129,7 @@ which provides flutter-specific extensions on top of [package:test](https://pub.
option to start the test in a paused state and wait for connection from a debugger. This option lets you
set breakpoints before the test runs.

To run all the tests for the entire Flutter repository, the same way that Travis runs them, run `dart dev/bots/test.dart`.
To run all the tests for the entire Flutter repository, the same way that Cirrus runs them, run `dart dev/bots/test.dart`.

If you've built [your own flutter engine](#working-on-the-engine-and-the-framework-at-the-same-time), you
can pass `--local-engine` to change what flutter shell `flutter test` uses. For example,
Expand Down Expand Up @@ -190,7 +190,7 @@ To send us a pull request:
Please make sure all your checkins have detailed commit messages explaining the patch.

Once you've gotten an LGTM from a project maintainer and once your PR has received
the green light from all our automated testing (Travis, Appveyor, etc), and once
the green light from all our automated testing (running on Cirrus, etc), and once
the tree is green (see the [design principles](https://flutter.io/design-principles/)
document for more details), submit your changes to the `master` branch using one of
the following methods:
Expand Down Expand Up @@ -285,7 +285,6 @@ Build infrastructure

We build and test Flutter on:

- Travis ([details](.travis.yml))
- AppVeyor ([details](appveyor.yml))
- [Cirrus](https://cirrus-ci.com/) ([details](.cirrus.yml))
- Chromebots (a.k.a. "recipes", [details](dev/bots/README.md))
- Devicelab (a.k.a. "cocoon", [details](dev/devicelab/README.md))
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# <img src="https://flutter.io/images/flutter-mark-square-100.png" alt="Flutter" width="40" height="40" /> Flutter [![Join Gitter Chat Channel -](https://badges.gitter.im/flutter/flutter.svg)](https://gitter.im/flutter/flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status - Travis](https://travis-ci.org/flutter/flutter.svg?branch=master)](https://travis-ci.org/flutter/flutter) [![Build Status - AppVeyor](https://ci.appveyor.com/api/projects/status/meyi9evcny64a2mg/branch/master?svg=true)](https://ci.appveyor.com/project/flutter/flutter/branch/master) [![Build Status - Cirrus](https://api.cirrus-ci.com/github/flutter/flutter.svg)](https://cirrus-ci.com/github/flutter/flutter) [![Coverage Status -](https://coveralls.io/repos/github/flutter/flutter/badge.svg?branch=master)](https://coveralls.io/github/flutter/flutter?branch=master)
# <img src="https://flutter.io/images/flutter-mark-square-100.png" alt="Flutter" width="40" height="40" /> Flutter [![Join Gitter Chat Channel -](https://badges.gitter.im/flutter/flutter.svg)](https://gitter.im/flutter/flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status - Cirrus](https://api.cirrus-ci.com/github/flutter/flutter.svg)](https://cirrus-ci.com/github/flutter/flutter)
[![Coverage Status -](https://coveralls.io/repos/github/flutter/flutter/badge.svg?branch=master)](https://coveralls.io/github/flutter/flutter?branch=master)

A new mobile app SDK to help developers and designers build modern mobile apps for iOS and Android. Flutter is an open-source project currently in beta.

Expand Down
18 changes: 10 additions & 8 deletions bin/flutter
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ function upgrade_flutter () {
fi

local revision="$(cd "$FLUTTER_ROOT"; git rev-parse HEAD)"
if [[ ! -f "$SNAPSHOT_PATH" ]] || [[ ! -s "$STAMP_PATH" ]] || [[ "$(cat "$STAMP_PATH")" != "$revision" ]] || [[ "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/pubspec.lock" ]]; then
if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$revision" || "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/pubspec.lock" ]]; then
rm -f "$FLUTTER_ROOT/version"
touch "$FLUTTER_ROOT/bin/cache/.dartignore"
"$FLUTTER_ROOT/bin/internal/update_dart_sdk.sh"
VERBOSITY=--verbosity=error
VERBOSITY="--verbosity=error"

echo Building flutter tool...
if [[ "$TRAVIS" == "true" ]] || [[ "$BOT" == "true" ]] || [[ "$CONTINUOUS_INTEGRATION" == "true" ]] || [[ "$CHROME_HEADLESS" == "1" ]] || [[ "$APPVEYOR" == "true" ]] || [[ "$CI" == "true" ]]; then
if [[ "$CI" == "true" || "$BOT" == "true" || "$CONTINUOUS_INTEGRATION" == "true" || "$CHROME_HEADLESS" == "1" ]]; then
PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_bot"
VERBOSITY=--verbosity=all
VERBOSITY="--verbosity=all"
fi
export PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_install"

Expand All @@ -104,8 +104,8 @@ function upgrade_flutter () {

while : ; do
cd "$FLUTTER_TOOLS_DIR"
"$PUB" upgrade $VERBOSITY --no-packages-dir && break
echo Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
"$PUB" upgrade "$VERBOSITY" --no-packages-dir && break
echo "Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds..."
sleep 5
done
"$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
Expand All @@ -132,7 +132,7 @@ DART="$DART_SDK_PATH/bin/dart"
PUB="$DART_SDK_PATH/bin/pub"

# Test if running as superuser – but don't warn if running within Docker
if [[ "$EUID" == "0" ]] && ! [[ -f /.dockerenv ]]; then
if [[ "$EUID" == "0" && ! -f /.dockerenv ]]; then
echo " Woah! You appear to be trying to run flutter as root."
echo " We strongly recommend running the flutter tool without superuser privileges."
echo " /"
Expand Down Expand Up @@ -160,12 +160,14 @@ fi
(upgrade_flutter) 3< "$PROG_NAME"

set +e
# FLUTTER_TOOL_ARGS isn't quoted below, because it is meant to be considered as
# separate space-separated args.
"$DART" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"

# The VM exits with code 253 if the snapshot version is out-of-date.
# If it is, we need to snapshot it again.
EXIT_CODE=$?
if [[ $EXIT_CODE -ne 253 ]]; then
if [[ $EXIT_CODE != 253 ]]; then
exit $EXIT_CODE
fi

Expand Down
6 changes: 2 additions & 4 deletions bin/flutter.bat
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ GOTO :after_subroutine
REM Makes changes to PUB_ENVIRONMENT only visible to commands within SETLOCAL/ENDLOCAL
SETLOCAL
SET VERBOSITY=--verbosity=error
IF "%TRAVIS%" == "true" GOTO on_bot
IF "%CI%" == "true" GOTO on_bot
IF "%BOT%" == "true" GOTO on_bot
IF "%CONTINUOUS_INTEGRATION%" == "true" GOTO on_bot
IF "%CHROME_HEADLESS%" == "1" GOTO on_bot
IF "%APPVEYOR%" == "true" GOTO on_bot
IF "%CI%" == "true" GOTO on_bot
GOTO not_on_bot
:on_bot
SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_bot
Expand All @@ -135,7 +133,7 @@ GOTO :after_subroutine
IF EXIST "%pub_cache_path%" SET PUB_CACHE=%pub_cache_path%
)
:retry_pub_upgrade
CALL "%pub%" upgrade %VERBOSITY% --no-packages-dir
CALL "%pub%" upgrade "%VERBOSITY%" --no-packages-dir
IF "%ERRORLEVEL%" NEQ "0" (
ECHO Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
timeout /t 5 /nobreak
Expand Down
16 changes: 11 additions & 5 deletions dev/bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion dev/bots/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
25 changes: 0 additions & 25 deletions dev/bots/travis_install.sh

This file was deleted.

63 changes: 0 additions & 63 deletions dev/bots/travis_script.sh

This file was deleted.

63 changes: 0 additions & 63 deletions dev/bots/travis_setup.sh

This file was deleted.

6 changes: 3 additions & 3 deletions dev/devicelab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
Loading

0 comments on commit e60087a

Please sign in to comment.