-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lower the bar on building Bio-Routing (#459)
* Add Makefile to build cmds and exmaples This Makefile provides some useful targets: * build (default) * clean * test * tets-coverage (test + write coverage) * all (clean build test) Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> * Add cmd/ris-lg/ris-lg to .gitignore and remove bazel Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> * Use make targets in GitHub workflow Remove build_examples.sh script replaced by Makefile Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> * Update README Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> * Remove -IS config from bio-rd example config Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> --------- Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
- Loading branch information
1 parent
c567987
commit a330f47
Showing
6 changed files
with
78 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/make | ||
# | ||
# Bio-Routing Makefile | ||
# | ||
# Maximilian Wilhelm <max@sdn.clinic> | ||
# -- Tue 02 Jan 2024 08:21:17 PM CET | ||
# | ||
|
||
expand_binary = $(dir)/$(notdir $(dir)) | ||
|
||
CMD_DIRS := $(wildcard cmd/*) | ||
CMDS := $(foreach dir, $(CMD_DIRS), $(expand_binary)) | ||
EXAMPLE_DIRS = $(wildcard examples/*) | ||
EXAMPLES := $(foreach dir, $(EXAMPLE_DIRS), $(expand_binary)) | ||
|
||
%: | ||
cd $(dir $(@)) && go build | ||
|
||
|
||
build: $(CMDS) $(EXAMPLES) | ||
|
||
all: clean build test | ||
|
||
clean: | ||
rm -f -- $(CMDS) $(EXMAPLES) | ||
|
||
test: | ||
@echo "Running tests..." | ||
go test ./... | ||
|
||
test-coverage: | ||
go test -v -cover -coverprofile=coverage.txt ./... | ||
|
||
.PHONY: all build clean test test-coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.