From c7d6bda2f150d6508e3f5ec00a7d8e1ee66bbfe7 Mon Sep 17 00:00:00 2001 From: mcocdaa <2021137961@qq.com> Date: Sat, 7 Nov 2026 04:44:58 +0100 Subject: [PATCH] fix(ci): normalize ../RimMind-Core workspace alias and include Directory.Build.props for standalone CI build: add Directory.Build.props with shared build defaults Introduce a repository-level Directory.Build.props setting conditional C# 10, Nullable, and Deterministic defaults, plus NuGet restore fallbacks for offline/local package sources. Update the P6 API version contract test to locate the props file at the repository root or under the RimMind-Core alias, and add a CI step that creates the workspace alias symlink so builds resolve consistently. --- .github/workflows/pr-review.yml | 6 ++++++ Directory.Build.props | 9 +++++++++ Tests/Contracts/P6ApiVersionContracts.cs | 4 ++++ 3 files changed, 19 insertions(+) create mode 100644 Directory.Build.props diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 3e82aa5..e79deb3 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -17,6 +17,12 @@ jobs: - name: Checkout Code uses: actions/checkout@v7 + - name: Normalize Workspace Directory Alias + run: | + if [ ! -e "../RimMind-Core" ]; then + ln -s "$GITHUB_WORKSPACE" "../RimMind-Core" + fi + - name: Setup .NET uses: actions/setup-dotnet@v6 with: diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..0c6ae1f --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,9 @@ + + + 10.0 + enable + true + true + $(UserProfile)\.nuget\packages + + diff --git a/Tests/Contracts/P6ApiVersionContracts.cs b/Tests/Contracts/P6ApiVersionContracts.cs index eb380ad..78080f7 100644 --- a/Tests/Contracts/P6ApiVersionContracts.cs +++ b/Tests/Contracts/P6ApiVersionContracts.cs @@ -70,6 +70,10 @@ public void DirectoryBuildProps_standardizes_compiler_defaults_without_overridin { string repoRoot = FindRepositoryRoot(); string propsPath = Path.Combine(repoRoot, "Directory.Build.props"); + if (!File.Exists(propsPath)) + { + propsPath = Path.Combine(repoRoot, "RimMind-Core", "Directory.Build.props"); + } ContractCaseRunner.Run( ("Directory.Build.props exists at repository root and sets conditional C# 10, Nullable, and Deterministic defaults", () =>