forked from ninja-build/ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
Team-4-submission #8
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
Open
waynewangyuxuan
wants to merge
5
commits into
nyuoss:team-4-HW1(env.setup)
Choose a base branch
from
YuWei-CH:master
base: team-4-HW1(env.setup)
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5f5474e
Add InputsCollector class.
digit-google 04a73ad
Fix `inputs` tool implementation.
digit-google 0da3113
Add new options to `inputs` tool.
digit-google 5e73bbb
init
YuWei-CH 75a9412
add test result display for circleCI dashboard
waynewangyuxuan 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 hidden or 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,54 @@ | ||
|
|
||
| version: 2.1 | ||
| jobs: | ||
| build-test: | ||
| docker: | ||
| - image: cimg/base:current | ||
| steps: | ||
| # Checkout the code as the first step. | ||
| - checkout | ||
| - run: | ||
| name: InstallPreq | ||
| command: | | ||
| echo "Installing clang-tidy" | ||
| sudo apt-get update && sudo apt-get install -y clang-tidy | ||
| echo "Installed" | ||
| - run: | ||
| name: Build | ||
| command: | | ||
| echo "Building" | ||
| mkdir build && cd build | ||
| cmake -S .. | ||
| make -j $(nproc) | ||
| cd ../ | ||
| echo "Built" | ||
| - run: | ||
| name: ninjaTest | ||
| command: | | ||
| cd build | ||
| ./ninja_test --gtest_output=XML | ||
| echo "Testing Done" | ||
| - store_test_results: | ||
| path: build | ||
| - run: | ||
| name: ctest | ||
| command: | | ||
| echo "Start Testing" | ||
| cd build | ||
| ctest --output-junit results.xml | ||
| echo "Testing Done" | ||
| - store_test_results: | ||
| path: build/results.xml | ||
| - run: | ||
| name: Run Performance Tests | ||
| command: | | ||
| cd build | ||
| for test in build_log_perftest canon_perftest clparser_perftest elide_middle_perftest hash_collision_bench; do | ||
| echo "Running $test" | ||
| ./$test | ||
| done | ||
|
|
||
| workflows: | ||
| build-test-workflow: | ||
| jobs: | ||
| - build-test | ||
This file contains hidden or 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 hidden or 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,100 +1,42 @@ | ||
| # Ninja | ||
|
|
||
| Ninja is a small build system with a focus on speed. | ||
| https://ninja-build.org/ | ||
|
|
||
| See [the manual](https://ninja-build.org/manual.html) or | ||
| `doc/manual.asciidoc` included in the distribution for background | ||
| and more details. | ||
|
|
||
| Binaries for Linux, Mac and Windows are available on | ||
| [GitHub](https://github.com/ninja-build/ninja/releases). | ||
| Run `./ninja -h` for Ninja help. | ||
|
|
||
| Installation is not necessary because the only required file is the | ||
| resulting ninja binary. However, to enable features like Bash | ||
| completion and Emacs and Vim editing modes, some files in misc/ must be | ||
| copied to appropriate locations. | ||
|
|
||
| If you're interested in making changes to Ninja, read | ||
| [CONTRIBUTING.md](CONTRIBUTING.md) first. | ||
|
|
||
| ## Building Ninja itself | ||
|
|
||
| You can either build Ninja via the custom generator script written in Python or | ||
| via CMake. For more details see | ||
| [the wiki](https://github.com/ninja-build/ninja/wiki). | ||
|
|
||
| ### Python | ||
|
|
||
| ``` | ||
| ./configure.py --bootstrap | ||
| ``` | ||
|
|
||
| This will generate the `ninja` binary and a `build.ninja` file you can now use | ||
| to build Ninja with itself. | ||
|
|
||
| If you have a GoogleTest source directory, you can build the tests | ||
| by passing its path with `--gtest-source-dir=PATH` option, or the | ||
| `GTEST_SOURCE_DIR` environment variable, e.g.: | ||
|
|
||
| ``` | ||
| ./configure.py --bootstrap --gtest-source-dir=/path/to/googletest | ||
| ./ninja all # build ninja_test and other auxiliary binaries | ||
| ./ninja_test` # run the unit-test suite. | ||
| ``` | ||
|
|
||
| Use the CMake build below if you want to use a preinstalled binary | ||
| version of the library. | ||
|
|
||
| ### CMake | ||
|
|
||
| ``` | ||
| cmake -Bbuild-cmake | ||
| cmake --build build-cmake | ||
| # Shadowdash | ||
|
|
||
| Shadowdash is a lightweight build system based on Ninja, focused on increasing build speed. | ||
|
|
||
| ## CMake | ||
| 1. Build Shadowdash and move ninja executable file to your local/bin: | ||
| ```bash | ||
| mkdir build && cd build | ||
| cmake -S .. | ||
| make -j $(nproc) | ||
| sudo cp ninja /usr/local/bin/ | ||
| ninja --version | ||
| ``` | ||
| 2. Build Clang-Tidy from source code: | ||
| ```bash | ||
| git clone https://github.com/llvm/llvm-project.git | ||
| cd llvm-project | ||
| mkdir build | ||
| cd build | ||
| cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release ../llvm | ||
| ninja clang-tidy | ||
| export PATH=$PATH:/path/to/your/llvm-project/build/bin | ||
| clang-tidy --version | ||
| ``` | ||
| Alternative Installation via Package Manager (Debian-based Systems): | ||
| If you’re using a Debian-based distribution like Ubuntu, you can install Clang-Tidy using the following command: | ||
| ```bash | ||
| sudo apt-get install -y clang-tidy | ||
| ``` | ||
| 3. Test: | ||
| ```bash | ||
| cd build | ||
| ctest | ||
| ``` | ||
|
|
||
| The `ninja` binary will now be inside the `build-cmake` directory (you can | ||
| choose any other name you like). | ||
|
|
||
| To run the unit tests: | ||
|
|
||
| ``` | ||
| ./build-cmake/ninja_test | ||
| ``` | ||
|
|
||
| ## Generating documentation | ||
|
|
||
| ### Ninja Manual | ||
|
|
||
| You must have `asciidoc` and `xsltproc` in your PATH, then do: | ||
|
|
||
| ``` | ||
| ./configure.py | ||
| ninja manual doc/manual.pdf | ||
| ``` | ||
|
|
||
| Which will generate `doc/manual.html`. | ||
|
|
||
| To generate the PDF version of the manual, you must have `dblatext` in your PATH then do: | ||
|
|
||
| ``` | ||
| ./configure.py # only if you didn't do it previously. | ||
| ninja doc/manual.pdf | ||
| ``` | ||
|
|
||
| Which will generate `doc/manual.pdf`. | ||
|
|
||
| ### Doxygen documentation | ||
|
|
||
| If you have `doxygen` installed, you can build documentation extracted from C++ | ||
| declarations and comments to help you navigate the code. Note that Ninja is a standalone | ||
| executable, not a library, so there is no public API, all details exposed here are | ||
| internal. | ||
|
|
||
| ``` | ||
| ./configure.py # if needed | ||
| ninja doxygen | ||
| ``` | ||
|
|
||
| Then open `doc/doxygen/html/index.html` in a browser to look at it. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
for extra credit you can build your own image, but for this hw, this is ok