Skip to content

Commit c7d6bda

Browse files
committed
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.
1 parent b629dd4 commit c7d6bda

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎.github/workflows/pr-review.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ jobs:
1717
- name: Checkout Code
1818
uses: actions/checkout@v7
1919

20+
- name: Normalize Workspace Directory Alias
21+
run: |
22+
if [ ! -e "../RimMind-Core" ]; then
23+
ln -s "$GITHUB_WORKSPACE" "../RimMind-Core"
24+
fi
25+
2026
- name: Setup .NET
2127
uses: actions/setup-dotnet@v6
2228
with:

‎Directory.Build.props‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<LangVersion Condition="'$(LangVersion)' == ''">10.0</LangVersion>
4+
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
5+
<Deterministic>true</Deterministic>
6+
<RestoreIgnoreFailedSources>true</RestoreIgnoreFailedSources>
7+
<RestoreSources Condition="'$(RestoreSources)' == '' and Exists('$(UserProfile)\.nuget\packages\krafs.rimworld.ref')">$(UserProfile)\.nuget\packages</RestoreSources>
8+
</PropertyGroup>
9+
</Project>

‎Tests/Contracts/P6ApiVersionContracts.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ public void DirectoryBuildProps_standardizes_compiler_defaults_without_overridin
7070
{
7171
string repoRoot = FindRepositoryRoot();
7272
string propsPath = Path.Combine(repoRoot, "Directory.Build.props");
73+
if (!File.Exists(propsPath))
74+
{
75+
propsPath = Path.Combine(repoRoot, "RimMind-Core", "Directory.Build.props");
76+
}
7377

7478
ContractCaseRunner.Run(
7579
("Directory.Build.props exists at repository root and sets conditional C# 10, Nullable, and Deterministic defaults", () =>

0 commit comments

Comments
 (0)