Here is a peek into how our development team uses do builds for Anka product locally using Anka itself. We have all seen multiple blog posts shared by developments teams who are developing on top of Linux explaining how their developers are using containers to setup build and test environments locally on their workstations, with all upstream CI dependencies. This eliminates the “But, it works on my machine” issues, reduces failures in the upstream CI process, make it easy to reproduce environments for debugging resulting in greater velocity in application development and release.
But, most important of all, it provides flexibility to developers to install and play with newer packages, frameworks on their machines without having to worry about breaking things with the mainline application build, test, and release process.
Our development team is enjoying the same benefits while building Anka product. Since Anka is for development on the macOS platform, we are doing local builds during development inside Anka on developer machines.
Like many development teams out there, we have set up a central CI to do automated and manual builds and testing for minor and major releases of Anka Flow and Anka Build products. We do CI builds inside Anka virtual machine environment.
However, we also do a large no of internal releases to continuously try and test new things and quickly address user issues. This is largely due to two things – First, Anka is new technology and as it’s getting adopted by users there is a lot of development activities taking place to address user requests, fix bugs etc and second, in the past 2-3 months with macOS Sierra to macOS HiSierra transition, we had to continuously keep pace with all beta updates. What this means is that our developers need agility to build Anka packages locally with their changes, without having to wait for it to go through the upstream CI pipeline.
In normal circumstances, this would be impossible because of a complex matrix of dependencies that are needed to do a release build. However, because we were already doing our CI builds in reproducible Anka macOS VMs using Anka Build, our developers just pull the latest version of build VM (build_vm2(sep 5)) from the Anka Registry on their machines and run their builds inside that environment (anka run build_vm2 ./build.sh). The output Anka Build and Anka Flow application packages are available on their local machines. We use a fairly large number of external libraries and packages in our application and having them all packaged in Anka build VM that is maintained by our DevOps, frees up the developer to have whatever they want on their laptops. Our developers very quickly transitioned to HiSierra and started working with Xcode 9, while we were still compiling and building Anka on Sierra and Xcode 8.3.3.
Step1 – pull `build_vm2` from Anka registry on local machine
Step 2 – Build locally with `anka run` inside build_vm2 Anka VM