Skip to content

Commit

Permalink
Add .NET 9 target for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Jun 25, 2024
1 parent 1972d82 commit 332ed8d
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'
include-prerelease: true
- name: Build
run: pwsh make.ps1
- name: Package
Expand All @@ -46,3 +51,6 @@ jobs:
- name: Test (net8.0)
run: ./make.ps1 -frameworks net8.0 test-all
shell: pwsh
- name: Test (net9.0)
run: ./make.ps1 -frameworks net9.0 test-all
shell: pwsh
2 changes: 1 addition & 1 deletion Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
Outputs="$(PackageDir)\DynamicLanguageRuntime.$(PackageVersion).zip">
<ItemGroup>
<ZipFiles Include="$(StageDir)\**\*.dll;$(StageDir)\**\*.xml;$(StageDir)\README.md;$(StageDir)\LICENSE"
Exclude="$(StageDir)\netcoreapp3.1\*;$(StageDir)\net7.0*\*;$(StageDir)\net8.0*\*;$(StageDir)\net9.0*\*" />
Exclude="$(StageDir)\netcoreapp3.1\*;$(StageDir)\net7.0*\*;$(StageDir)\net9.0*\*" />
</ItemGroup>
<Message Text="$(ZipFiles)" />
<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\DynamicLanguageRuntime.$(PackageVersion).zip" WorkingDirectory="$(StageDir)"/>
Expand Down
6 changes: 6 additions & 0 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ steps:
inputs:
packageType: 'sdk'
version: '8.0.x'

- task: UseDotNet@2
displayName: Install .NET 9.0 SDK for build
inputs:
packageType: 'sdk'
version: '9.0.x'
includePreviewVersions: true

# Set Mono version on macOS
Expand Down
1 change: 1 addition & 0 deletions Dlr.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{60056F49
Build\net462.props = Build\net462.props
Build\net6.0.props = Build\net6.0.props
Build\net8.0.props = Build\net8.0.props
Build\net9.0.props = Build\net9.0.props
Build\netstandard2.0.props = Build\netstandard2.0.props
Build\steps.yml = Build\steps.yml
EndProjectSection
Expand Down
6 changes: 3 additions & 3 deletions Package/nuget/DynamicLanguageRuntime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</dependencies>
</metadata>
<files>
<file src="**\*.dll" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="**\*.dll" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net9.0*\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net9.0*\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net9.0*\*" />
<file src="README.md;LICENSE" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void Parse(string[] args) {
private void ParseOption(string arg, out string name, out string value) {
Debug.Assert(arg != null);

int colon = arg.IndexOf(':');
int colon = arg.IndexOf(':', StringComparison.Ordinal);

if (colon >= 0) {
name = arg.Substring(0, colon);
Expand Down
5 changes: 5 additions & 0 deletions Src/Microsoft.Dynamic/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public static bool StartsWith(this string str, char value)
{
return str.StartsWith(value.ToString(), StringComparison.Ordinal);
}

public static int IndexOf(this string str, char value, StringComparison comparisonType) {
if (comparisonType == StringComparison.Ordinal) return str.IndexOf(value);
return str.IndexOf(value.ToString(), comparisonType);
}
#endif
}
}
2 changes: 1 addition & 1 deletion Tests/Metadata/Metadata.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0;net9.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<OutputType>Exe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Microsoft.Dynamic.Test/Microsoft.Dynamic.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0;net9.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0;net9.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Param(
[Parameter(Position=1)]
[String] $target = "release",
[String] $configuration = "Release",
[String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'),
[String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0','net9.0'),
[String] $platform = "x64",
[switch] $runIgnored
)
Expand Down

0 comments on commit 332ed8d

Please sign in to comment.