forked from DynamoDS/Dynamo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
- Loading branch information
Showing
59 changed files
with
1,803 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Check File Version | ||
# | ||
# This script checks the version exe and dll the files in the Dynamo's bin directory. | ||
# It compares the version of each file with the version of DynamoSandbox.exe. | ||
# If the version of a file doesn't match the version of DynamoSandbox.exe, the script will exit with an error code. | ||
# | ||
# https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.fileversioninfo | ||
param ( | ||
[Parameter(Mandatory = $true)][string]$path | ||
) | ||
|
||
$ErrorActionPreference = "Stop" | ||
|
||
$includedFiles = @("*.exe", "*.dll") | ||
$excludedFiles = @( | ||
"*.config", | ||
"*.ds", | ||
"*.json", | ||
"*.md", | ||
"*.rtf", | ||
"*.xml", | ||
"AdpSDKCSharpWrapper.dll", | ||
"AdskIdentitySDK.dll", | ||
"Analytics.NET.*.dll", | ||
"Autodesk*.dll", | ||
"CommandLine.dll", | ||
"Cyotek.Drawing.BitmapFont.dll", | ||
"DiffPlex.dll", | ||
"DocumentFormat.OpenXml.dll", | ||
"DotNetProjects.Wpf.Extended.Toolkit.dll", | ||
"Dynamo.Microsoft.Xaml.Behaviors.dll", | ||
"FontAwesome5*.dll", | ||
"ForgeUnitsManaged.dll", | ||
"Greg.dll", | ||
"HarfBuzzSharp.dll", | ||
"HelixToolkit*.dll", | ||
"ICSharpCode.AvalonEdit.dll", | ||
"J2N.dll", | ||
"JUnit.TestLogger.dll", | ||
"LaunchDarkly.*", | ||
"LibG*.dll", | ||
"libiconv.dll", # https://jira.autodesk.com/browse/DYN-7069 | ||
"libintl.dll", # https://jira.autodesk.com/browse/DYN-7069 | ||
"libHarfBuzzSharp.dll", # https://jira.autodesk.com/browse/DYN-6598 | ||
"libSkiaSharp.dll", # https://jira.autodesk.com/browse/DYN-6598 | ||
"LiveChartsCore*.dll", | ||
"Lucene.Net*.dll", | ||
"MIConvexHull.NET Standard.dll", | ||
"Microsoft.*", | ||
"MimeMapping.dll", | ||
"Moq.dll", | ||
"Newtonsoft.Json.dll", | ||
"NuGet.Frameworks.dll", | ||
"nunit*.dll", | ||
"NUnit3*.dll", | ||
"Prism.dll", | ||
"ProtoGeometry*.dll", | ||
"Python*.dll", | ||
"RestSharp.dll", | ||
"SharpDX*.dll", | ||
"SkiaSharp*.dll", | ||
"Spekt.TestLogger.dll", | ||
"StarMath.dll", | ||
"System.*.dll", | ||
"testcentric.engine.metadata.dll", | ||
"testhost.dll", | ||
"testhost.exe", | ||
"Units.dll", | ||
"Webview2Loader.dll" | ||
) | ||
$noVersion = @() | ||
$wrongVersion = @() | ||
|
||
$dynamoSandbox = Join-Path -Path $path -ChildPath "DynamoSandbox.exe" | ||
if (Test-Path $dynamoSandbox) { | ||
$fileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($dynamoSandbox).FileVersion | ||
try { | ||
$dynamoVersion = [System.Version]::Parse($fileVersion) | ||
Write-Output "::notice::ℹ️ DynamoSandbox.exe - $dynamoVersion`n" | ||
} catch { | ||
Write-Output "::error::❌ Failed to get the version of DynamoSandbox.exe" | ||
exit 1 | ||
} | ||
} else { | ||
Write-Output "::error::⚠️ DynamoSandbox.exe was not found" | ||
exit 1 | ||
} | ||
|
||
$files = Get-ChildItem -Path $path -Include $includedFiles -Exclude $excludedFiles -Recurse -File | ||
foreach ($file in $files) { | ||
$name = $file.Name | ||
try { | ||
$fileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($file).FileVersion | ||
$version = [System.Version]::Parse($fileVersion) | ||
if ($version -eq $dynamoVersion) { | ||
Write-Host "✅ $name - $version" | ||
} else { | ||
Write-Host "❌ $name - $version" | ||
$wrongVersion += $file | ||
} | ||
} catch { | ||
Write-Host "❌ $name" | ||
$noVersion += $file | ||
} | ||
} | ||
|
||
if ($noVersion.Count -gt 0 -Or $wrongVersion.Count -gt 0) { | ||
if ($noVersion.Count -gt 0) { | ||
Write-Host "`n`e[4mThe following file(s) don't have version information`e[24m" | ||
$title = "Missing version information" | ||
foreach ($file in $noVersion) { | ||
$message = "$($file.Name) - $($file.FullName)" | ||
Write-Output "::error title=$title::$message" | ||
} | ||
} | ||
|
||
if ($wrongVersion.Count -gt 0) { | ||
Write-Host "`n`e[4mThe following file(s) don't have the expected version: $dynamoVersion`e[24m" | ||
$title = "Unexpected version information" | ||
foreach ($file in $wrongVersion) { | ||
$message = "$($file.Name) - $($file.FullName) - $($(Get-Item $file).VersionInfo.FileVersion)" | ||
Write-Output "::error title=$title::$message" | ||
} | ||
} | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Build DynamoCore.sln | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build_windows_runtime: | ||
name: Build DynamoCore windows runtime | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Dynamo Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: Dynamo | ||
repository: DynamoDS/Dynamo | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
- name: Disable problem matcher | ||
run: Write-Output "::remove-matcher owner=csc::" | ||
- name: Setup msbuild | ||
uses: microsoft/setup-msbuild@v2 | ||
- name: Install dependencies for windows runtime | ||
run: | | ||
dotnet restore ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release --runtime=win-x64 | ||
- name: Build DynamoCore with MSBuild for Windows | ||
run: | | ||
msbuild ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release | ||
- name: Look for DynamoCLI.exe | ||
run: | | ||
Write-Output "***Locating DynamoCLI.exe!***" | ||
if (Test-Path -Path "${{ github.workspace }}\Dynamo\bin\AnyCPU\Release\DynamoCLI.exe") { | ||
Write-Output "DynamoCLI.exe exists!" | ||
} else { | ||
Write-Error "DynamoCLI.exe was not found!" | ||
} | ||
build_linux_runtime_on_windows: | ||
name: Build DynamoCore linux runtime on windows | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Dynamo Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: Dynamo | ||
repository: DynamoDS/Dynamo | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
- name: Disable problem matcher | ||
run: Write-Output "::remove-matcher owner=csc::" | ||
- name: Setup msbuild | ||
uses: microsoft/setup-msbuild@v2 | ||
- name: Install dependencies for linux runtime | ||
run: dotnet restore ${{ github.workspace }}\Dynamo\src\DynamoCore.sln -p:Platform=NET_Linux --runtime=linux-x64 | ||
- name: Build DynamoCore with MSBuild for Linux | ||
run: msbuild ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release /p:Platform=NET_Linux | ||
- name: Look for DynamoCLI | ||
run: | | ||
Write-Output "***Locating DynamoCLI for Linux!***" | ||
if (Test-Path -Path "${{ github.workspace }}\Dynamo\bin\NET_Linux\Release\DynamoCLI") { | ||
Write-Output "DynamoCLI exists!" | ||
} else { | ||
Write-Error "DynamoCLI was not found!" | ||
} | ||
build_linux_runtime_on_linux: | ||
name: Build DynamoCore linux runtime on linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Dynamo Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: Dynamo | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
- name: Disable problem matcher | ||
run: echo "::remove-matcher owner=csc::" | ||
- name: Install dependencies for linux runtime | ||
run: dotnet restore ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -p:Platform=NET_Linux --runtime=linux-x64 | ||
- name: Build DynamoCore with dotnet for Linux | ||
run: dotnet build ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -c Release /p:Platform=NET_Linux | ||
- name: Look for DynamoCLI.exe | ||
run: | | ||
echo "***Locating DynamoCLI for Linux!***" | ||
cd "${{ github.workspace }}/Dynamo/bin/NET_Linux/Release" | ||
test "./DynamoCLI.exe" && echo "DynamoCLI exists!" | ||
- name: Run smoke tests | ||
run: | | ||
cd "${{ github.workspace }}/Dynamo/bin/NET_Linux/Release" | ||
# TODO unfortunately dotnet does not find any tests in this assembly. | ||
# dotnet test DynamoCoreTests.dll --filter "TestCategory~UnitTest" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.