mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:58:13 +00:00
68dc77f456
This involves a few main pieces: - Add code to the GN scripts to generate DDC's patched SDK and then compile it to summaries and JS in the build output directory. - Add support to the underlying DDC build scripts to support controlling which files are built where. - Update test.dart to use the DDC SDK from the build directory. - Update create_sdk to use the built SDK instead of the checked in one. - Fix various internal DDC tools to build their own copy of the SDK (since they can't easily find the one in the build directory because it's path if config-specific) and use those. - Delete the checked DDC SDK JS and summaries. I think I got everything working. The built Dart SDK looks fine -- it's identical to one built using the old build scripts. The various tools and DDC's little test runner I *think* work, but there may be a bug or two in there. I tried the various things I could and it seems like they work but it's hard to tell since they may be kind of broken right now anyway. Bug: Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c Reviewed-on: https://dart-review.googlesource.com/18144 Commit-Queue: Bob Nystrom <rnystrom@google.com> Reviewed-by: Zach Anderson <zra@google.com> Reviewed-by: Vijay Menon <vsm@google.com>
100 lines
3.5 KiB
YAML
100 lines
3.5 KiB
YAML
language: dart
|
|
sudo: required
|
|
dist: trusty
|
|
dart:
|
|
- dev
|
|
cache:
|
|
directories:
|
|
- $HOME/.npm
|
|
- $HOME/.nvm
|
|
- $HOME/.pub-cache/hosted
|
|
- pkg/dev_compiler/node_modules
|
|
addons:
|
|
firefox: latest
|
|
before_install:
|
|
# g++4.8.1 setup
|
|
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
|
|
|
# clang 3.4 setup
|
|
- if [ "$CXX" == "clang++" ]; then sudo add-apt-repository -y ppa:h-rayflood/llvm; fi
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
# g++4.8.1 install
|
|
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
|
|
|
|
# clang 3.4 install
|
|
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi
|
|
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi
|
|
|
|
- if [ "$CXX" ]; then $CXX --version ; fi
|
|
|
|
# Chrome install
|
|
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
- wget https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
|
|
- sudo dpkg -i google-chrome*.deb
|
|
- /usr/bin/google-chrome --version
|
|
- export CHROME_BIN=/usr/bin/google-chrome
|
|
- /usr/bin/google-chrome-unstable --version
|
|
- export CHROME_CANARY_BIN=/usr/bin/google-chrome-unstable
|
|
|
|
# Install Depot Tools
|
|
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
- export PATH=`pwd`/depot_tools:"$PATH"
|
|
|
|
# Checkout everything to pull in sdk and third_party dart packages
|
|
- cd ..
|
|
- 'gclient config --spec=''solutions = [ { "name": "sdk", "url": "git@github.com:dart-lang/sdk.git", "deps_file": "DEPS", "managed": False } ]'''
|
|
- gclient sync -n
|
|
- download_from_google_storage --no_auth --no_resume --bucket dart-dependencies --extract -s sdk/third_party/pkg/unittest.tar.gz.sha1
|
|
- cd sdk
|
|
|
|
# If a C++ compiler is set, run hooks and build the SDK - else use the preinstalled SDK instead.
|
|
- export DART_USE_GYP=1
|
|
- if [ "$CXX" ]; then gclient runhooks ; fi
|
|
- if [ "$CXX" ]; then ./tools/build.py -m release create_sdk ; fi
|
|
- if [ "$CXX" ]; then export PATH=`pwd`/out/ReleaseX64/dart-sdk/bin:"$PATH" ; fi
|
|
- dart --version
|
|
|
|
# DDC setup
|
|
- cd pkg/dev_compiler
|
|
- pub global activate dart_coveralls
|
|
- export DISPLAY=:99.0
|
|
- sh -e /etc/init.d/xvfb start
|
|
install:
|
|
# Empty to suppress default pub get behavior
|
|
before_script:
|
|
# Node modules used by DDC
|
|
- nvm install 6.9.1
|
|
- npm install
|
|
script:
|
|
# Run DDC tests
|
|
- if [[ -z "$TEST" ]]; then ./tool/presubmit.sh ; fi
|
|
- if [[ "$TEST" == sdk ]]; then ./tool/build_sdk.sh && git diff --exit-code ; fi
|
|
- if [[ "$TEST" == coverage ]]; then ./tool/build_sdk.sh && ./tool/coverage.sh ; fi
|
|
- if [[ "$TEST" == node ]]; then ./tool/node_test.sh ; fi
|
|
- if [[ "$TEST" == package ]]; then ./tool/build_sdk.sh && ./tool/build_pkgs.dart --analyzer-sdk=gen/sdk/ddc_gen.sum --output=gen/codegen_output/pkg --travis; fi
|
|
env:
|
|
- ANALYZER=master DDC_BROWSERS=ChromeTravis
|
|
- ANALYZER=master DDC_BROWSERS=Firefox
|
|
- ANALYZER=master DDC_BROWSERS=ChromeCanaryTravis
|
|
# TODO(vsm): We don't get much value from this for DDC & it eats up travis
|
|
# cycles. Consider adding back at some point to test the built dartdevc
|
|
# snapshot.
|
|
# - ANALYZER=master CXX=clang++
|
|
- TEST=sdk
|
|
- TEST=coverage
|
|
- TEST=package
|
|
matrix:
|
|
allow_failures:
|
|
- env: ANALYZER=master CXX=clang++
|
|
- env: ANALYZER=master DDC_BROWSERS=ChromeTravis
|
|
- env: ANALYZER=master DDC_BROWSERS=ChromeCanaryTravis
|
|
- env: ANALYZER=master DDC_BROWSERS=Firefox
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- dev-compiler+buildbot@dartlang.org
|
|
on_failure: change
|