https://github.com/acrlabs/build-scripts
Build scripts for Applied Computing projects
https://github.com/acrlabs/build-scripts
Last synced: 5 months ago
JSON representation
Build scripts for Applied Computing projects
- Host: GitHub
- URL: https://github.com/acrlabs/build-scripts
- Owner: acrlabs
- License: cc0-1.0
- Created: 2023-08-27T02:43:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-15T19:40:55.000Z (6 months ago)
- Last Synced: 2026-01-15T15:38:12.342Z (5 months ago)
- Language: Makefile
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ACRL build-scripts
Build scripts for Applied Computing Research Labs projects
## To use:
Add this repo as a submodule in your repo:
```
git submodule add https://github.com/acrlabs/build-scripts build
```
Create a `Makefile` in your project defining a list of build artifacts in the `ARTIFACTS` variable;
Then, include `build/base.mk, and then define a build target for `$(ARTIFACTS)`. You should also define build targets
for `test`, `lint`, and `cover` (these can be empty if you don't want to do anything here). Note the ordering is
important here.
You can reference `$(BUILD_DIR)` and `$(K8S_MANIFEST_DIR)` in your build targets.
The default build target is `build image run` which builds your artifacts, creates Docker images for them, and deploys
them to your Kubernetes cluster. You can also run `make verify` to run `lint test cover`.
If you want to change the behaviour of the `run` target, redefine the `RUN_COMMANDS` variable after including the base
Makefile, as follows:
```
include build/base.mk
define RUN_COMMANDS
command1
command2
...
endef
```
## Example project makefile:
```
ARTIFACTS=binary1 binary2
include build/base.mk
$(ARTIFACTS):
CGO_ENABLED=0 go build -trimpath -o $(BUILD_DIR)/$@ ./cmd/$@
lint:
golangci-lint run
cover:
go-carpet -summary
```
---
To the extent possible under law,
Applied Computing Research Labs, LLC
has waived all copyright and related or neighboring rights to
this work.
This work is published from:
United States.