diff --git a/CMakeLists.txt b/CMakeLists.txt index ec48a961e..2a3d52af1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,25 @@ add_custom_target(debug_coordinator BYPRODUCTS debug_coordinator ) +# +# debugd +# + +add_custom_target(debugd ALL + CGO_ENABLED=0 go build -o ${CMAKE_BINARY_DIR}/debugd -buildvcs=false -ldflags "-buildid=''" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/debugd/debugd/cmd/debugd + BYPRODUCTS debugd +) + +# +# cdbg +# + +add_custom_target(cdbg ALL + CGO_ENABLED=0 go build -o ${CMAKE_BINARY_DIR}/cdbg -buildvcs=false -ldflags "-buildid=''" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/debugd/cdbg + BYPRODUCTS cdbg +) add_test(NAME unittest COMMAND go test -race -count=3 ./... WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) add_test(NAME integrationtest COMMAND go test -v -tags integration ./test/ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) diff --git a/debugd/README.md b/debugd/README.md index e5ebcef56..f462dddc6 100644 --- a/debugd/README.md +++ b/debugd/README.md @@ -1,23 +1,11 @@ # debug daemon (debugd) -## debugd Prerequisites - -* Go 1.18 - -## Build debugd +## Build cdbg ``` mkdir -p build -go build -o build/debugd debugd/debugd/cmd/debugd/debugd.go -``` - -## Build & install cdbg - -The go install command for cdbg only works inside the checked out repository due to replace directives in the `go.mod` file. - -``` -git clone https://github.com/edgelesssys/constellation && cd constellation -go install github.com/edgelesssys/constellation/debugd/cdbg +cmake .. +make cdbg ``` ## debugd & cdbg usage @@ -64,7 +52,7 @@ With `cdbg` and `yq` installed in your path: constellation-conf.yaml ``` 4. Run `constellation create […]` -5. Run `cdbg deploy` +5. Run `./cdbg deploy` 6. Run `constellation init […]` as usual