-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for downloading and using VS Code #197
Merged
woody-apple
merged 5 commits into
project-chip:master
from
woody-apple:build-documentation
Apr 1, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
# Documentation | ||
|
||
## Building and Developing | ||
|
||
* Documentation about building from the command line can be found in [the build guide](./BUILDING.md) | ||
* Documentation about standard build & development flows using [Visual Studio Code](https://code.visualstudio.com/) can be found in [the development guide](./VSCODE_DEVELOPMENT.md) | ||
|
||
## Project Flow | ||
|
||
* Documentation about general CHIP usage of GitHub, and project tools is documented in [the project flow](./PROJECT_FLOW.md) | ||
|
||
## Style Guide | ||
|
||
* Documentation about style is documented in [the style guide](./STYLE_GUIDE.md) | ||
* Additional documentation about more specific files are in the [style folder](./style/) | ||
|
||
## Third Party Tools | ||
|
||
Some tools and utilities are dependent on third party tools, such as Docker. | ||
|
||
[Docker](https://www.docker.com) is an excellent way to have stable build environments that don't pollute the host OS. It is also much easier to maintain stability across multiple host environments. Install stable version of [Docker Desktop](https://www.docker.com/products/docker-desktop) relevant to your native OS (MacOS or Windows). Once installed, you can run docker commands from the shell/terminal. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Visual Studio Code Development | ||
|
||
[Visual Studio Code](https://code.visualstudio.com/) is a great and simple IDE that can be used to build & develop with for CHIP. | ||
|
||
CHIP supports the docker / remote container workflow in Visual Studio Code, and has a container environment setup automatically. You can read more about this workflow [here](https://code.visualstudio.com/docs/remote/containers). | ||
|
||
Tested on: | ||
* MacOS 10.5 | ||
* Windows 10 Pro + WSL + Ubuntu 18 LTS | ||
|
||
## Setup Steps | ||
|
||
1. *Windows Only* Enable the Windows Subsystem for Linux (WSL) following instructions here: <https://docs.microsoft.com/en-us/windows/wsl/install-win10> | ||
1. *Windows Only* Install Ubuntu from the Windows App Store here: <https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q> | ||
1. Install [Docker](https://www.docker.com/) for your operating system of choice from here: <https://docs.docker.com/install> | ||
1. Install [Visual Studio Code](https://code.visualstudio.com/) for your operating system of choice here: <https://code.visualstudio.com/Download> | ||
1. Install [Git](https://git-scm.com/) if you haven't already | ||
1. Git clone the main CHIP repository here: <https://github.com/project-chip/connectedhomeip> | ||
1. Launch Visual Studio Code, and open the cloned folder from | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: remove the |
||
1. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code, this extension allows you to use docker containers as a development backend. | ||
1. Once this is installed, you'll be prompted to reload Visual Studio Code, do so | ||
1. At the bottom right of your Visual Studio Code window you should have a new box prompting you to re-open the window as a container. Hit yes. | ||
1. *Windows Only* Update your Visual Studio Code settings as documented here: https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration to use Bash on Ubuntu (on Windows) eg: | ||
`"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe` | ||
1. Now your local machine is building a docker image that has all the tools necessary to build and test CHIP. This can take some time, but will eventually complete and open up the source tree | ||
|
||
## Bootstrapping your source tree (one time) | ||
1. Under the "Terminal" menu (or using another shortcut to the same tool), select "Run Task..." | ||
1. Select the "Bootstrap" task | ||
|
||
## Building the Source Tree | ||
1. Under the "Terminal" menu select "Run Build Task..." | ||
|
||
## Tasks | ||
|
||
Located in the [tasks json](../.vscode/tasks.json) file you'll find a list of tasks that can be run from the "Run Task..." command. | ||
Example tasks are "Clean", "Run Pretty Check" | ||
|
||
Developers are encouraged to add tasks to the [tasks json](../.vscode/tasks.json) over time to make sure everyone is using the same base configuration and build. | ||
|
||
### Current base tasks are listed here | ||
* Main Build - Full build and test of the tree | ||
* Auto-enforce coding style | ||
* Verify coding style conformance | ||
* Run Unit and Functional Tests | ||
* Run Distribution Generation - Build and check distribution, running all functional and unit tests | ||
* Run Code Coverage (via 'make coverage') | ||
* Clean build - Full clean build and test of the tree | ||
* Bootstrap the source tree - On a clean tree, pull in the third party dependencies required | ||
* Clean Tree - Full (and destructive) git clean of the tree | ||
|
||
## Launch Tasks | ||
|
||
Located in the [launch json](../.vscode/launch.json) file you'll find a list of build & run jobs that can be run from the "Run" tab and start a run or debug session. | ||
|
||
Developers are encouraged to add tasks to the [launch json](../.vscode/launch.json) over time to make sure everyone is using the same base debuging setup. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Style | ||
|
||
When necessary to drive into more detail about styles about specific types of files this is where CHIP collects them | ||
|
||
## Specific Types | ||
* [Makefiles](./STYLE_MAKEFILES.md) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this might just be a bit of OCD on my part, but you have 2 links defined here and one includes the
the
and the other doesn't. Recommend removing thethe
as that appear to fall inline with the rest of the document.