diff --git a/pkgs/collection/.travis.yml b/pkgs/collection/.travis.yml index b4d1316d..433c12e9 100644 --- a/pkgs/collection/.travis.yml +++ b/pkgs/collection/.travis.yml @@ -1,41 +1,23 @@ - language: dart -# Gives more resources on Travis (8GB Ram, 2 CPUs). -# Do not remove without verifying w/ Travis. -sudo: required -addons: - chrome: stable +dart: +- 2.0.0 +- dev -# Build stages: https://docs.travis-ci.com/user/build-stages/. -stages: - - presubmit - - build - - testing +dart_task: +- test -# 1. Run dartfmt, dartanalyzer, pub run test (VM). -# 2. Then run a build. -# 3. Then run tests compiled via dartdevc and dart2js. -jobs: +matrix: include: - - stage: presubmit - script: ./tool/travis.sh dartfmt - dart: dev - - stage: presubmit - script: ./tool/travis.sh dartanalyzer - dart: dev - - stage: build - script: ./tool/travis.sh dartdevc_build - dart: dev - - stage: testing - script: ./tool/travis.sh vm_test - dart: dev - - stage: testing - script: ./tool/travis.sh dartdevc_test - dart: dev - - stage: testing - script: ./tool/travis.sh dart2js_test - dart: dev + # Only validate formatting using the dev release + - dart: dev + dart_task: dartfmt + - dart: dev + dart_task: + dartanalyzer: --fatal-infos --fatal-warnings . + - dart: 2.0.0 + dart_task: + dartanalyzer: --fatal-warnings . # Only building master means that we don't run two builds for each pull request. branches: @@ -44,11 +26,4 @@ branches: # Incremental pub cache and builds. cache: directories: - - $HOME/.pub-cache - - .dart_tool - -# Necessary for Chrome and Firefox to run -before_install: - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - - "t=0; until (xdpyinfo -display :99 &> /dev/null || test $t -gt 10); do sleep 1; let t=$t+1; done" + - $HOME/.pub-cache diff --git a/pkgs/collection/codereview.settings b/pkgs/collection/codereview.settings deleted file mode 100644 index 4afc2cf6..00000000 --- a/pkgs/collection/codereview.settings +++ /dev/null @@ -1,3 +0,0 @@ -CODE_REVIEW_SERVER: http://codereview.chromium.org/ -VIEW_VC: https://github.com/dart-lang/collection/commit/ -CC_LIST: reviews@dartlang.org diff --git a/pkgs/collection/pubspec.yaml b/pkgs/collection/pubspec.yaml index 23587a78..615838a2 100644 --- a/pkgs/collection/pubspec.yaml +++ b/pkgs/collection/pubspec.yaml @@ -7,7 +7,7 @@ homepage: https://www.github.com/dart-lang/collection environment: # Required for Dart 2.0 collection changes. - sdk: '>=2.0.0-dev.55.0 <3.0.0' + sdk: '>=2.0.0 <3.0.0' dev_dependencies: build_runner: ^1.0.0 diff --git a/pkgs/collection/tool/travis.sh b/pkgs/collection/tool/travis.sh deleted file mode 100755 index 0e584b9e..00000000 --- a/pkgs/collection/tool/travis.sh +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2018 the Dart project authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#!/bin/bash - -if [ "$#" == "0" ]; then - echo -e '\033[31mAt least one task argument must be provided!\033[0m' - exit 1 -fi - -EXIT_CODE=0 - -while (( "$#" )); do - TASK=$1 - case $TASK in - dartfmt) echo - echo -e '\033[1mTASK: dartfmt\033[22m' - echo -e 'dartfmt -n --set-exit-if-changed .' - dartfmt -n --set-exit-if-changed . || EXIT_CODE=$? - ;; - dartanalyzer) echo - echo -e '\033[1mTASK: dartanalyzer\033[22m' - echo -e 'dartanalyzer --fatal-warnings .' - dartanalyzer --fatal-warnings . || EXIT_CODE=$? - ;; - vm_test) echo - echo -e '\033[1mTASK: vm_test\033[22m' - echo -e 'pub run test -P travis -p vm -x requires-dart2' - pub run test -p vm || EXIT_CODE=$? - ;; - dartdevc_build) echo - echo -e '\033[1mTASK: build\033[22m' - echo -e 'pub run build_runner build --fail-on-severe' - pub run build_runner build --fail-on-severe || EXIT_CODE=$? - ;; - dartdevc_test) echo - echo -e '\033[1mTASK: dartdevc_test\033[22m' - echo -e 'pub run build_runner test -- -P travis -p chrome' - pub run build_runner test -- -p chrome || EXIT_CODE=$? - ;; - dart2js_test) echo - echo -e '\033[1mTASK: dart2js_test\033[22m' - echo -e 'pub run test -P travis -p chrome -x requires-dart2' - pub run test -p chrome || EXIT_CODE=$? - ;; - *) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m" - EXIT_CODE=1 - ;; - esac - - shift -done - -exit $EXIT_CODE