Planning to use a monorepo to structure your Go codes but not quite keen on the complexity of Bazel? You might want to check out:
flowerinthenight / golang-monorepo
An example of a golang-based monorepo.
This is an example of a golang-based monorepo. It has the following features:
- Only build the services or cmds that are modified in a commit;
- Build all services and/or cmds that are affected by changes in common codes (i.e.
- Build all services and/or cmds that are affected by changes in
For now, CircleCI 2.1 and GitHub Actions are supported. But since it uses bash scripts and Makefiles, it should be fairly straightforward to port to TravisCI or AppVeyor, etc.
At the moment, CI is setup to use Go 1.14[.x] with
GOFLAGS=-mod=vendor environment variables enabled during build. See sample dockerfile for more details.
How does it work
During CI builds, build.sh iterates the updated files within the commit range (
CIRCLE_COMPARE_URL environment variable in CircleCI) or the modified files within a single commit (when the value is not a valid…
It uses Bash scripts, Makefiles, and the go tools to determine what binaries to build based on commit changes. You might find this useful.
Top comments (0)