Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,60 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest-large]
os: [windows-latest, ubuntu-22.04, macos-14]
# macOS 14 Sonoma will be deprecated on 2026-07-06 and unsupported on 2026-11-02
# https://github.com/actions/runner-images/issues/13518
# but it is the last macOS image that comes with Mono preinstalled
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md

steps:
- uses: actions/checkout@v4
- name: Setup .NET 6.0
# Prerequisites
- name: Checkout DLR source code
uses: actions/checkout@v4

# Setup .NET
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '10.0.x'
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup .NET 9.0
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '6.0.x'

# Build & package
- name: Build
run: pwsh make.ps1
- name: Package
run: pwsh make.ps1 package

# Upload package
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}
path: Package/Release/Packages
- name: Test (net462)
run: ./make.ps1 -frameworks net462 test-all

# Tests
- name: Test (net10.0)
run: ./make.ps1 -frameworks net10.0 test-all
shell: pwsh
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
- name: Test (net9.0)
run: ./make.ps1 -frameworks net9.0 test-all
shell: pwsh
- 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
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
shell: pwsh
- name: Test (net462)
run: ./make.ps1 -frameworks net462 test-all
shell: pwsh
4 changes: 2 additions & 2 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
displayName: Linux (Ubuntu)
timeoutInMinutes: 180
pool:
vmImage: ubuntu-latest
vmImage: ubuntu-22.04
steps:
- template: Build/steps.yml
parameters:
Expand All @@ -30,7 +30,7 @@ jobs:
displayName: macOS
timeoutInMinutes: 180
pool:
vmImage: macOS-latest
vmImage: macOS-14
steps:
- template: Build/steps.yml
parameters:
Expand Down
37 changes: 37 additions & 0 deletions Build/net10.0.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFullFramework>false</IsFullFramework>
</PropertyGroup>

<PropertyGroup>
<Features>$(Features);FEATURE_APARTMENTSTATE</Features>
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
<Features>$(Features);FEATURE_CODEDOM</Features>
<Features>$(Features);FEATURE_COM</Features>
<Features>$(Features);FEATURE_CONFIGURATION</Features>
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
<Features>$(Features);FEATURE_FILESYSTEM</Features>
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
<Features>$(Features);FEATURE_FULL_NET</Features>
<Features>$(Features);FEATURE_LCG</Features>
<Features>$(Features);FEATURE_LOADWITHPARTIALNAME</Features>
<Features>$(Features);FEATURE_METADATA_READER</Features>
<Features>$(Features);FEATURE_MMAP</Features>
<Features>$(Features);FEATURE_NATIVE</Features>
<Features>$(Features);FEATURE_PIPES</Features>
<Features>$(Features);FEATURE_PROCESS</Features>
<Features>$(Features);FEATURE_REFEMIT</Features>
<Features>$(Features);FEATURE_REGISTRY</Features>
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
<Features>$(Features);FEATURE_STACK_TRACE</Features>
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
<Features>$(Features);FEATURE_THREAD</Features>
<Features>$(Features);FEATURE_TYPE_EQUIVALENCE</Features>
<Features>$(Features);FEATURE_TYPECONVERTER</Features>
<Features>$(Features);FEATURE_XMLDOC</Features>
</PropertyGroup>
</Project>
20 changes: 13 additions & 7 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ steps:
displayName: Grab Package Version

- task: UseDotNet@2
displayName: Install .NET 6.0 runtime for testing
displayName: Install .NET 10.0 SDK for build
inputs:
packageType: 'sdk'
version: '10.0.x'

- task: UseDotNet@2
displayName: Install .NET 9.0 runtime for testing
inputs:
packageType: 'runtime'
version: '6.0.x'
version: '9.0.x'

- task: UseDotNet@2
displayName: Install .NET 8.0 runtime for testing
Expand All @@ -34,10 +40,10 @@ steps:
version: '8.0.x'

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

# Set Mono version on macOS
- ${{ if eq(parameters.os, 'macOS') }}:
Expand All @@ -60,8 +66,8 @@ steps:
targetType: inline
script: |
dotnet --info
try { msbuild -version } catch { }
try { mono --version } catch { }
try { msbuild -version } catch { echo "msbuild not found" }
try { mono --version } catch { echo "mono not found" }

- powershell: ./make.ps1
displayName: Build
Expand Down
1 change: 1 addition & 0 deletions Dlr.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{60056F49
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\net10.0.props = Build\net10.0.props
Build\netstandard2.0.props = Build\netstandard2.0.props
Build\steps.yml = Build\steps.yml
EndProjectSection
Expand Down
3 changes: 3 additions & 0 deletions Package/nuget/DynamicLanguageRuntime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<group targetFramework="net8.0">
<dependency id="System.CodeDom" version="8.0.0" />
</group>
<group targetFramework="net10.0">
<dependency id="System.CodeDom" version="10.0.0" />
</group>
</dependencies>
</metadata>
<files>
Expand Down
9 changes: 7 additions & 2 deletions Src/Microsoft.Dynamic/Microsoft.Dynamic.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0;net10.0</TargetFrameworks>
<RootNamespace>Microsoft.Scripting</RootNamespace>
<BaseAddress>859832320</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
<!-- Suppress CA2263 for .NET 10 - prefer to keep consistent code across all frameworks -->
<NoWarn>$(NoWarn);CA2263</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Scripting.Metadata\Microsoft.Scripting.Metadata.csproj" Condition=" $(Features.Contains('FEATURE_METADATA_READER')) " />
<ProjectReference Include="..\Microsoft.Scripting\Microsoft.Scripting.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Src/Microsoft.Scripting.Metadata/MemoryMapping.V4.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

Expand Down
11 changes: 9 additions & 2 deletions Src/Microsoft.Scripting/Microsoft.Scripting.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0;net10.0</TargetFrameworks>
<BaseAddress>857735168</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down Expand Up @@ -32,6 +32,13 @@
<PackageReference Include="System.CodeDom" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.CodeDom" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
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;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
16 changes: 11 additions & 5 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Param(
[Parameter(Position=1)]
[String] $target = "release",
[String] $configuration = "Release",
[String[]] $frameworks=@('net462','net6.0','net8.0','net9.0'),
[String] $platform = "x64",
[String[]] $frameworks=@('net462','net6.0','net8.0','net9.0','net10.0'),
[String] $platform = $null, # auto-detect
[switch] $runIgnored
)

Expand Down Expand Up @@ -61,8 +61,12 @@ function GenerateRunSettings([String] $folder, [String] $framework, [String] $pl
[System.Xml.XmlDocument]$doc = New-Object System.Xml.XmlDocument

# <RunSettings>
# <RunConfiguration>
# <TargetPlatform>x64</TargetPlatform> <!-- if defined -->
# </RunConfiguration>
# <TestRunParameters>
# <Parameter name="FRAMEWORK" value="net462" />
# <Parameter name="CONFIGURATION" value="Release" />
# </TestRunParameters>
# </RunSettings>

Expand All @@ -73,9 +77,11 @@ function GenerateRunSettings([String] $folder, [String] $framework, [String] $pl

$runConfiguration = $doc.CreateElement("RunConfiguration")
$runSettings.AppendChild($runConfiguration) | Out-Null
$targetPlatform = $doc.CreateElement("TargetPlatform")
$targetPlatform.InnerText = $platform
$runConfiguration.AppendChild($targetPlatform) | Out-Null
if ($platform) {
$targetPlatform = $doc.CreateElement("TargetPlatform")
$targetPlatform.InnerText = $platform
$runConfiguration.AppendChild($targetPlatform) | Out-Null
}

$testRunParameters = $doc.CreateElement("TestRunParameters")
$runSettings.AppendChild($testRunParameters) | Out-Null
Expand Down
Loading