-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
treewide: Add Makefile's with a standardised set of targets
This is to simplify dev/ci and allows anyone not familiar with Go/Python/Whatever to hack on components without also learning about relevant build tooling.
- Loading branch information
1 parent
7c2de50
commit b6b177b
Showing
9 changed files
with
99 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
all: build test lint format | ||
|
||
build: | ||
for pkg in packages/*; do \ | ||
This comment has been minimized.
Sorry, something went wrong. |
||
bash -c "cd $$pkg && nix-shell --run 'make build'"; \ | ||
done | ||
|
||
test: | ||
for pkg in packages/*; do \ | ||
bash -c "cd $$pkg && nix-shell --run 'make test'"; \ | ||
done | ||
|
||
lint: | ||
for pkg in packages/*; do \ | ||
bash -c "cd $$pkg && nix-shell --run 'make lint'"; \ | ||
done | ||
|
||
format: | ||
nixpkgs-fmt --check . | ||
for pkg in packages/*; do \ | ||
bash -c "cd $$pkg && nix-shell --run 'make format'"; \ | ||
done |
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,11 @@ | ||
build: | ||
cargo build | ||
|
||
test: | ||
true # noop, no tests | ||
|
||
lint: | ||
true # noop, no linter | ||
|
||
format: | ||
true # noop, no formatter |
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 @@ | ||
__pycache__ |
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,11 @@ | ||
build: | ||
true # noop, no build step for python | ||
|
||
test: | ||
python -m tests | ||
|
||
lint: | ||
true # noop, no linter | ||
|
||
format: | ||
black --quiet --check . |
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,12 @@ | ||
build: | ||
bash -c "cd trustix_nix_reprod/js && nix-shell --run 'npm run build'" | ||
true # noop, no build step for python | ||
|
||
test: | ||
@true | ||
|
||
lint: | ||
true # noop, no linter | ||
|
||
format: | ||
black --quiet --check . |
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,11 @@ | ||
build: | ||
go build | ||
|
||
test: | ||
@true | ||
|
||
lint: | ||
true # noop, we're not using a linter for Go | ||
|
||
format: | ||
gofmt -d . |
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
all: go py | ||
|
||
go: | ||
build: | ||
$(MAKE) -C schema | ||
$(MAKE) -C protocol | ||
$(MAKE) -C proto | ||
$(MAKE) -C api | ||
|
||
py: | ||
bash -c 'cd ../trustix-python && nix-shell --run make' | ||
|
||
test: | ||
true # noop, no tests for codegen | ||
|
||
lint: | ||
@true # noop, no linter for codegen | ||
|
||
format: | ||
gofmt -d . |
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 |
---|---|---|
@@ -1,2 +1,11 @@ | ||
all: | ||
$(MAKE) -C dev | ||
build: | ||
true # noop, no build step for python | ||
|
||
test: | ||
true # no tests, codegen | ||
|
||
lint: | ||
true # noop, no linter | ||
|
||
format: | ||
black --quiet --check . |
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 |
---|---|---|
@@ -1,2 +1,11 @@ | ||
all: | ||
build: | ||
go build | ||
|
||
test: | ||
$(MAKE) -C tests | ||
|
||
lint: | ||
true # noop, we're not using a linter for Go | ||
|
||
format: | ||
gofmt -d . |
if there were targets rather than a bash loop, they could be executed in parallel if you care about that.