Skip to content

Commit

Permalink
Merge pull request #2 from SpiceSharp/development
Browse files Browse the repository at this point in the history
Update project structure
  • Loading branch information
svenboulanger authored Sep 1, 2024
2 parents 01682a2 + d91a3b9 commit 01110d6
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 232 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Compile Spice#
- name: Compile Spice#.BSIM
run: dotnet build SpiceSharpBSIM\SpiceSharpBSIM.csproj --configuration Release --no-restore

- name: Publish to NuGet
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.userprefs

# Build results
[Bb]uild/
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
Expand Down
46 changes: 46 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Directories -->
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<BuildDir>$(RepoRoot)build\</BuildDir>
<DocPath>$(BuildDir)doc\</DocPath>
</PropertyGroup>

<!-- Build info -->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NeutralLanguage>en</NeutralLanguage>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>latest</LangVersion>
<OutputPath>$(BuildDir)bin\$(MSBuildProjectName)\</OutputPath>
<BaseIntermediateOutputPath>$(BuildDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<DocumentationFile>$(DocPath)$(MSBuildProjectName).xml</DocumentationFile>
</PropertyGroup>

<!-- Assembly info -->
<PropertyGroup>
<Authors>Sven Boulanger</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Title>Spice#.BSIM</Title>
<Company>SpiceSharp</Company>
</PropertyGroup>

<!-- NuGet package info -->
<PropertyGroup>
<PackageProjectUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</PackageProjectUrl>
<RepositoryUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</RepositoryUrl>
<PackageTags>circuit electronics netlist spice simulator simulation ode solver design bsim</PackageTags>
<PackageReleaseNotes>Refer to the GitHub release for release notes.</PackageReleaseNotes>
<PackageIcon>logo_full.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup>
<None Include="$(RepoRoot)/logo_full.png" Pack="true" Visible="false" PackagePath="" />
<None Include="$(RepoRoot)README.md" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
51 changes: 51 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Only create packages for non-test projects -->
<PropertyGroup Condition="'$(TestProjectType)' == ''">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<!-- Packages for all projects -->
<ItemGroup>
<PackageReference Include="SpiceSharp" Version="3.2.0" />
<PackageReference Include="SpiceSharpGenerator" Version="1.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Include the default test packages for test projects -->
<ItemGroup Condition="'$(TestProjectType)' != ''">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Console" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Disable some rules for test projects -->
<PropertyGroup Condition="'$(TestProjectType)' != ''">
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>

<!-- Automatic versioning using GitInfo if UseGitInfo is set to true -->
<PropertyGroup Condition="'$(UseGitInfo)' == 'true'">
<GitSkipCache>true</GitSkipCache>
<GitBaseVersionRegex>^(?:\w+-)?v?(?&lt;MAJOR&gt;\d+)\.(?&lt;MINOR&gt;\d+)\.(?&lt;PATCH&gt;\d+)$</GitBaseVersionRegex>
</PropertyGroup>
<ItemGroup Condition="'$(UseGitInfo)' == 'true'">
<PackageReference Include="GitInfo" Version="3.3.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
63 changes: 1 addition & 62 deletions SpiceSharpBSIM/SpiceSharpBSIM.csproj
Original file line number Diff line number Diff line change
@@ -1,69 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Spice#.BSIM is a library for Spice# that contains the BSIM models.</Description>
<UseGitInfo>true</UseGitInfo>
<GitTagRegex>v*</GitTagRegex>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Spice#.BSIM</Title>
<Authors>Sven Boulanger</Authors>
<PackageProjectUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</RepositoryUrl>
<Description>BSIM models for Spice#.</Description>
<PackageIcon>logo_full.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<PackageTags>circuit electronics netlist spice simulator simulation ode solver design</PackageTags>
<PackageReleaseNotes>Refer to the GitHub release for release notes.</PackageReleaseNotes>
<NeutralLanguage>en</NeutralLanguage>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition="'$(UseGitInfo)' == 'true'">
<GitSkipCache>true</GitSkipCache>
<GitBaseVersionRegex>^(?:\w+-)?v?(?&lt;MAJOR&gt;\d+)\.(?&lt;MINOR&gt;\d+)\.(?&lt;PATCH&gt;\d+)$</GitBaseVersionRegex>
</PropertyGroup>
<ItemGroup Condition="'$(UseGitInfo)' == 'true'">
<PackageReference Include="GitInfo" Version="3.3.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Remove="Components\Semiconductors\BSIM\BSIM3v24\**" />
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Components\Semiconductors\BSIM\BSIM3v24\**" />
<EmbeddedResource Remove="Properties\**" />
<None Remove="Components\Semiconductors\BSIM\BSIM3v24\**" />
<None Remove="Properties\**" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Components\Semiconductors\BSIM\BSIM1Behaviors\TransientBehavior.cs" />
<Compile Remove="Components\Semiconductors\BSIM\BSIM2Behaviors\TransientBehavior.cs" />
<Compile Remove="Components\Semiconductors\BSIM\BSIM3Behaviors\TransientBehavior.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="SpiceSharp" Version="3.2.0" />
<PackageReference Include="SpiceSharpGenerator" Version="1.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Update="logo_full.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
13 changes: 0 additions & 13 deletions SpiceSharpBSIMTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("SpiceSharpBSIMTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SpiceSharpBSIMTests")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]

[assembly: Guid("973e74d9-9d52-432d-9400-8baa78d99b5c")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 01110d6

Please sign in to comment.