Table of Contents
Hi! Welcome to JuCC.
- GitHub We use GitHub for all our development.
- Account Sign up for a GitHub account.
- OS Make sure you are running Ubuntu 20.04. If not, the recommended approach is to dual boot or to use a VM.
- IDE We recommend Visual Studio Code.
- Packages Install using
- Go to the folder:
cd ~/jucc/script/installation - Install all the necessary packages:
sudo bash ./packages.sh
- Go to the folder:
You should learn a little about the following:
- We try our best to list all available options in CMakeLists.txt. Search for
# HEADER CMake options and global variables.
- You should know these targets.
jucc: Building will build thejuccbinary and all its dependencies.jucc_benchmark: Building will build and link thejuccobject file to thebenchmarklibrary. Running will run the benchmarks.test: Building will run all unit tests usinggtest. This will not show specifics of failed test, runbuild/bin/jucc_testfor detailed info.format: Building will run the formatterclang-formaton the codebase with our rules. Use this every time right before you commit and right before you make a pull request!check-format: Building will check if the codebase is correctly formatted according toclang-formatwith our rules.check-clang-tidy: Building will check if the codebase passes theclang-tidystatic analyzer tests with our rules.check-lint: Building will check if the codebase passes thebuild-support/cpplint.pychecks.
If you run into issues, you may need your default python to point to a python3 install. For example, add this to your ~/.zshrc: alias python=python3
- Check out the latest version of the JuCC repository.
git checkout maingit pull upstream main
- Create a new branch.
git checkout -b my_new_branch
- Work on your code. Add features, add documentation, add tests, add remove bugs, and so on.
- Push your code.
- Make sure you run tests locally! See below.
git push -u origin my_new_branch
- Go to GitHub and open a new pull request.
- When a pull request is opened, this triggers our Continuous Integration environment on circle-ci.
- CI will clone the repo, apply your changes, and make sure that formatting, linting, tests, etc pass.
- Code has to pass all the checks for it to be merged!
Use make test or ninja test to run inside your build folder to run all tests.
For detailed test info:
- Go to the folder:
cd ~/JuCC/build - Generate optimized config with
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release - Build project with
ninja - Run
./bin/jucc_test
- Go to the folder:
cd ~/JuCC/build - Generate optimized config with
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release - Build project with
ninja - Run
./bin/jucc_benchmark [...options]