diff --git a/.circleci/config.yml b/.circleci/config.yml index 62291703e2..1c5133e617 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,31 +1,35 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference version: 2.1 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job + build-test: docker: - # Specify the version you desire here - # See: https://circleci.com/developer/images/image/cimg/base - image: cimg/base:current - - # Add steps to the job - # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps steps: # Checkout the code as the first step. - checkout - run: - name: "Say hello" - command: "echo Hello, World!" + 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: Test + command: | + echo "Start Testing" + cd build + ctest + echo "Testing Done" -# Orchestrate jobs using workflows -# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows workflows: - say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. - # Inside the workflow, you define the jobs you want to run. + build-test-workflow: jobs: - - say-hello \ No newline at end of file + - build-test \ No newline at end of file diff --git a/README.md b/README.md index 9312d935f3..6249912138 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/commands.md b/commands.md deleted file mode 100644 index a2a3cfae7e..0000000000 --- a/commands.md +++ /dev/null @@ -1,17 +0,0 @@ -mkdir build && cd build -cmake -S .. -make -j $(nproc) -ls -ctest -sudo cp ninja /usr/local/bin/ (move nin to local/bin) -ninja --version - -(cd ..) -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:/home/yuwei/Documents/llvm-project/build/bin -clang-tidy --version \ No newline at end of file