mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
Matches the sshd/ssh, httpd/http unix pattern. Single Docker image now ships both binaries: ENTRYPOINT is mpcd (the daemon); override with 'mpc <subcommand>' for CLI ops (peers, identity, recover, etc). Also aligns with lux/kms (single binary with subcommands) — operators get the same shape across all Base-family daemons.
64 lines
1.5 KiB
Makefile
64 lines
1.5 KiB
Makefile
.PHONY: all build clean mpcd mpc test test-verbose test-coverage e2e-test e2e-clean cleanup-test-env test-all clean-all up down logs
|
|
|
|
# Go 1.26 experimental features:
|
|
# runtimesecret - zeroes stack/register state after secret.Do() for forward secrecy
|
|
# simd - SIMD intrinsics (amd64/arm64)
|
|
GOEXPERIMENT ?= runtimesecret,simd
|
|
|
|
all: build
|
|
|
|
build: mpcd mpc
|
|
|
|
mpcd:
|
|
GOWORK=off GOEXPERIMENT=$(GOEXPERIMENT) go build -o mpcd ./cmd/mpcd
|
|
|
|
mpc:
|
|
GOWORK=off GOEXPERIMENT=$(GOEXPERIMENT) go build -o mpc ./cmd/mpc
|
|
|
|
# Run all tests (json1 enables SQLite JSON functions for ORM JSONB queries)
|
|
test:
|
|
CGO_ENABLED=1 GOEXPERIMENT=$(GOEXPERIMENT) go test -tags json1 ./...
|
|
|
|
test-verbose:
|
|
CGO_ENABLED=1 GOEXPERIMENT=$(GOEXPERIMENT) go test -tags json1 -v ./...
|
|
|
|
test-coverage:
|
|
CGO_ENABLED=1 GOEXPERIMENT=$(GOEXPERIMENT) go test -tags json1 -v -coverprofile=coverage.out ./...
|
|
go tool cover -html=coverage.out -o coverage.html
|
|
|
|
# E2E
|
|
e2e-test: build
|
|
@echo "Running E2E integration tests..."
|
|
cd e2e && make test
|
|
|
|
e2e-test-coverage: build
|
|
@echo "Running E2E integration tests with coverage..."
|
|
cd e2e && make test-coverage
|
|
|
|
e2e-clean:
|
|
@echo "Cleaning up E2E test artifacts..."
|
|
cd e2e && make clean
|
|
|
|
cleanup-test-env:
|
|
@echo "Performing comprehensive test environment cleanup..."
|
|
cd e2e && ./cleanup_test_env.sh
|
|
|
|
test-all: test e2e-test
|
|
|
|
# Local dev environment (compose.yml)
|
|
up:
|
|
docker compose up -d
|
|
|
|
down:
|
|
docker compose down
|
|
|
|
logs:
|
|
docker compose logs -f
|
|
|
|
# Clean
|
|
clean:
|
|
rm -f mpcd mpc
|
|
rm -f coverage.out coverage.html
|
|
|
|
clean-all: clean e2e-clean
|