Skip to content

Latest commit

 

History

History
95 lines (73 loc) · 3.4 KB

CONTRIBUTING.md

File metadata and controls

95 lines (73 loc) · 3.4 KB

Contributing to Sky

Build Status

Getting the code

To get the code:

solutions = [
  {
    "managed": False,
    "name": "src",
    "url": "[email protected]:<your_name_here>/sky_engine.git",
    "custom_deps": {},
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]
target_os = ["android"]

Building the code

Currently we support building on Linux only, for an Android target and for a headless Linux target. Building on MacOS for Android, iOS, and a head-less MacOS target is coming soon.

Android (cross-compiling from Linux)

  • (Only the first time) sudo ./build/install-build-deps-android.sh
  • (Only the first time) ./tools/android/download_android_tools.py
  • ./sky/tools/gn --android
  • ninja -C out/android_Debug
  • ./sky/tools/shelldb start out/android_Debug/ sky/sdk/example/hello_world/lib/main.dart

Linux (on Linux)

  • (Only the first time) sudo ./build/install-build-deps.sh
  • ./sky/tools/gn
  • ninja -C out/Debug

Running the code

  • ./sky/tools/test_sky --debug runs the tests on the host machine using out/Debug.
  • ./out/Debug/sky_shell --package-root=out/Debug/gen/dart-pkg/packages sky/sdk/example/hello_world/lib/main.dart Note: Because Linux is headless, you won't see any UI. You can use print to generate console output or you can interact with the DartVM via observatory at http://localhost:8181/.

Contributing code

The Sky engine repository gladly accepts contributions via GitHub pull requests:

  • git fetch upstream
  • git checkout upstream/master -b name_of_your_branch
  • Hack away
  • git commit -a
  • git push origin name_of_your_branch
  • git pull-request (if you are using Hub) or go to https://github.com/<your_name_here>/sky_engine and click the "Compare & pull request" button

Please make sure all your checkins have detailed commit messages explaining the patch. If you made multiple commits for a single pull request, either make sure each one has a detailed message explaining that specific commit, or squash your commits into one single checkin with a detailed message before sending the pull request.

You must complete the Contributor License Agreement. You can do this online, and it only takes a minute. If you've never submitted code before, you must add your (or your organization's) name and contact info to the AUTHORS file.

Running tests

Tests are only supported on Linux currently.

  • sky/tools/test_sky --debug
    • This runs the tests against //out/Debug. If you want to run against //out/Release, omit the --debug flag.