csharp-sdk/Makefile
Copilot 9c1538fd98
Add AOT compatibility publish test (#1246)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
2026-02-09 22:00:12 +02:00

47 lines
1.3 KiB
Makefile

SOURCE_DIRECTORY := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
ARTIFACT_PATH := $(SOURCE_DIRECTORY)artifacts
DOCS_PATH := $(SOURCE_DIRECTORY)docs
CONFIGURATION ?= Release
clean:
dotnet clean
rm -rf $(ARTIFACT_PATH)/*
rm -rf $(DOCS_PATH)/api
restore:
dotnet tool restore
dotnet restore
build: restore
dotnet build --no-restore --configuration $(CONFIGURATION)
test: build
dotnet test \
--no-build \
--configuration $(CONFIGURATION) \
--filter '(Execution!=Manual)' \
--blame \
--blame-crash \
--blame-hang-timeout 7m \
--diag "$(ARTIFACT_PATH)/diag.txt" \
--logger "trx" \
--collect "XPlat Code Coverage" \
--results-directory $(ARTIFACT_PATH)/testresults \
-- \
RunConfiguration.CollectSourceInformation=true
test-aot:
dotnet publish tests/ModelContextProtocol.AotCompatibility.TestApp/ModelContextProtocol.AotCompatibility.TestApp.csproj --configuration $(CONFIGURATION) -o $(ARTIFACT_PATH)/aot-publish
$(ARTIFACT_PATH)/aot-publish/ModelContextProtocol.AotCompatibility.TestApp
pack: restore
dotnet pack --no-restore --configuration $(CONFIGURATION)
generate-docs: restore
dotnet build -c Release
dotnet docfx $(DOCS_PATH)/docfx.json --warningsAsErrors true
serve-docs: generate-docs
dotnet docfx serve $(ARTIFACT_PATH)/_site --port 8080
.DEFAULT_GOAL := build