Skip to content

Commit

Permalink
Enable UseArtifactsOutput for src projects only + minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed Nov 19, 2024
1 parent 42c9211 commit 446df58
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
dotnet-version: |
6.0
8.0
- uses: actions/checkout@v4
- name: 'Run: Compile, Test, Pack'
run: ./build.cmd Compile Test Pack
Expand All @@ -44,6 +45,7 @@ jobs:
with:
dotnet-version: |
6.0
8.0
- uses: actions/checkout@v4
- name: 'Run: Compile, Test, Pack'
run: ./build.cmd Compile Test Pack
Expand All @@ -55,6 +57,7 @@ jobs:
with:
dotnet-version: |
6.0
8.0
- uses: actions/checkout@v4
- name: 'Run: Compile, Test, Pack'
run: ./build.cmd Compile Test Pack
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>true</WarningsAsErrors>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>

<PropertyGroup Label="Code Analysis">
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/Acornima.Benchmarks/run.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

SETLOCAL

IF NOT [%2] == [] (
SET RUNTIMES=%2
IF NOT [%1] == [] (
SET RUNTIMES=%1
)

IF [%2] == [] (
IF [%1] == [] (
SET RUNTIMES=net8.0 net48
)

Expand Down
2 changes: 1 addition & 1 deletion build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected override GitHubActionsJob GetJobs(GitHubActionsImage image, IReadOnlyC
var job = base.GetJobs(image, relevantTargets);
var newSteps = new List<GitHubActionsStep>(job.Steps);
// only need to list the ones that are missing from default image
newSteps.Insert(0, new GitHubActionsSetupDotNetStep(["6.0"]));
newSteps.Insert(0, new GitHubActionsSetupDotNetStep(["6.0", "8.0"]));
job.Steps = newSteps.ToArray();
return job;
}
Expand Down
1 change: 0 additions & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<UseArtifactsOutput>false</UseArtifactsOutput>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Karambolo.Public.snk</AssemblyOriginatorKeyFile>

<UseArtifactsOutput>true</UseArtifactsOutput>
<ArtifactsPath>$(MSBuildThisFileDirectory)..\artifacts</ArtifactsPath>

<Authors>Adam Simon</Authors>
<Copyright>Adam Simon</Copyright>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
Expand All @@ -19,6 +22,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<GenerateDocumentationFile>true</GenerateDocumentationFile>

<NoWarn>1591;$(NoWarn)</NoWarn>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public class SourceGeneratorTest

protected static string ToSourcePath(string path, string project = MainProject)
{
return Path.Combine($"../../../../src/{project}/", path);
return Path.Combine("..", "..", "..", "..", "..", "src", project, path);
}
}
4 changes: 2 additions & 2 deletions test/Acornima.Tests/ParserTests.Fixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ internal static string GetFixturesPath()
var assemblyPath = typeof(RegExpTests).GetTypeInfo().Assembly.Location;
#endif
var assemblyDirectory = new FileInfo(assemblyPath).Directory;
var root = Path.Combine(assemblyDirectory?.Parent?.Parent?.Parent?.Parent?.FullName ?? "", "test", "Acornima.Tests");
return root;
var root = assemblyDirectory?.Parent?.Parent?.Parent?.FullName;
return root ?? "";
}

public static IEnumerable<object[]> Fixtures(string relativePath)
Expand Down

0 comments on commit 446df58

Please sign in to comment.