Git Workflow¶
All GitHub repositories used by BoxLambda are instantiated in BoxLambda's repository as git submodules. The git submodules are located in the sub/ directory:
sub
├── ibex
├── ibex_wb
├── wbuart32
└── ...
Each git submodule is a fork of a GitHub project. For example, sub/ibex/ contains my ibex fork, not the original ibex repository.
In each forked submodule, there are two relevant branches:
master: I keep this branch in sync with the master branch of the original repository to make it easy to pull updates and submit occasional pull requests.boxlambda: This branch is where modifications for BoxLambda will be made.
In the BoxLambda repository, there are several long-running branches:
master: Releases are submitted to this branch, ensuring that it's always in good shape.develop: Active development happens on this branch, with changes being constantly made, so it may not always be stable.gh-pages: This branch holds the BoxLambda Blog files. By default, GitHub Pages use thegh-pagesbranch of a project.boxlambda-gh-pages-wip: Work-in-progress Blog updates and some config file modifications for local previewing are in this branch. When updates are ready for release, they're merged to thegh-pagesbranch.
Adding Submodules¶
To add a new git submodule:
- Fork the repo on GitHub.
- In your forked repo, create a
boxlambdabranch and set it as default. - Run the following commands in the root directory of your local BoxLambda repository:
git submodule add <URL to forked repo> sub/<submodule name>
git commit -m 'Add submodule <submodule name>'
cd sub/<submodule name>
git remote set-url origin git@github.com:epsilon537/<repo name>.git
The last step is necessary to switch the remote URL from HTTPS to SSH for authentication preference.
Creating a new release (Note to Self)¶
On develop branch:
- Update
CHANGELOG.md. - In
sim_a7_100build tree, build all and run ctest. - In
arty_a7_100build tree, build all. - Copy from
arty_a7_100build tree tobinariesdirectory:boxlambda_base.bit,bootloader.bin,boxkern.bin. - Flash
boxlambda_basegateware project build and bootloader. - Run the
boxkerntestfssoftware test suite inboxlambda_ossoftware project build directory. - Run
markdown-link-check.sh. - Run
export_docs.sh develop.
On master branch:
- Merge
develop. - In
sim_a7_100build tree, build all and run ctest. - Run
export_docs.sh master. git tag vX.Y.Z.- In
arty_a7_100build tree, build all. - Flash
boxlambda_basegateware project build,bootloader, andboxlambda_os. - Copy the contents of directory
fs/to an SD card and boot the target from that SD card. - Check bootloader version string.
- Run the
boxkerntestfssoftware test suite inboxlambda_ossoftware project build directory. - Copy from
arty_a7_100build tree tobinariesdirectory:boxlambda_base.bit,bootloader.bin,boxlambda_os.bin. git committhe binaries.- Update tag to include the new binaries:
git tag -f vX.Y.Z. git push origin vX.Y.Z.- On GitHub boxlambda repo, navigate to Releases, then Draft a new release.
- On GitHub boxlambda repo, update/close open issues.
- In read-the-docs, create a new released based on the new tag.