I have a new goal. The goal is to build up a home development infrastructure that is similar to what's available at most software companies. Here's what I want to have.
- Source control server
- Build system
- Build farm
- Submit tests
- Continuous tests
For source control server I decided to use git over ssh. It is simple to setup and works well for for small number of developers, which in my case is just one, maybe two in a blue moon. The git server will use a mono repository since that's what I am used to at work, and I am too lazy to set up multiple repos for the many hello world projects I plan to ship.
As for the build system, I have decided to use Bazel. It is more complicated than Make, but I feel the tradeoff is worth it, especially since I use it at work. Bazel is nice since it also supports remote builds, so it is relatively easy to setup a build farm, or in my case a lonely build workstation (maybe two?) and scale up from there. The eventual goal is to have a pool of build machines that includes Intel i7, AMD Ryzen, and Raspberry Pi 4s. Why RPi4? Because they are cheap and I want to play around with clusters.
The submit tests and continuous integration tests will be done by integrating the Bazel test rules with Git hooks. I haven't really given much thought yet, but the idea is to use Bazel to query for tests and run them. For submit tests, there are two tests that will be done. First, I'll use reverse dependency query to determine all targets that will be affected by the commit and see if the build breaks. Second, if all downstream targets build correctly, then all tests that depends on the affected targets will be executed to verify that all tests still pass. If the number of tests are large, which will happen sooner or later as the repo grows, a random (perhaps weighted) sample of the tests will be tested. The random sampling will also apply to build checks if the number of affected build targets grow too large as well.
The continuous integration tests are Bazel tests that may be too large/long to be run at every commit to the repo, so they'll be executed at a fixed time interval, most likely at night when activities are low. The results will be logged and users notified if any of the tests break.
That's it for now. Tomorrow (not wall clock but more of a "journey" perspective) I'll start with the Git server.
Very good, This information is essential and informative which you have shared here. Read more info about esd workbench. It is beneficial for beginners to develop their knowledge. It is very gainful information. Thanks for share it.
ReplyDelete