Skip to content

Commit

Permalink
Merge pull request #1 from SpiceSharp/development
Browse files Browse the repository at this point in the history
Setup github actions and use gitinfo (ref. Spice#)
  • Loading branch information
svenboulanger authored Sep 1, 2024
2 parents c85be29 + efb642c commit 01682a2
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to NuGet

on:
release:
branches: [ master ]
types: [ published ]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@master

- name: Setup dotnet tooling
uses: actions/setup-dotnet@master
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

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

- name: Publish to NuGet
env:
APIKEY: ${{ secrets.NUGET_APIKEY }}
run: dotnet nuget push ".\build\bin\SpiceSharpBSIM\SpiceSharpBSIM.*.nupkg" -k $env:APIKEY -s "https://api.nuget.org/v3/index.json"

31 changes: 31 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linux Tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Setup dotnet tooling
uses: actions/setup-dotnet@master
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

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

- name: Compile Spice#.BSIM.Tests
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore
31 changes: 31 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: MacOS Tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@master

- name: Setup dotnet tooling
uses: actions/setup-dotnet@master
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

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

- name: Compile Spice#.BSIM.Tests
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore
31 changes: 31 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Windows Tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@master

- name: Setup dotnet tooling
uses: actions/setup-dotnet@master
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

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

- name: Compile Spice#.BSIM.Test
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace SpiceSharpBSIM.Components.Semiconductors.BSIM
{
/// <summary>
/// A class that describes correlated thermal noise between multiple ports.
/// </summary>
public class CorrelatedNoiseThermal : NoiseSource
{
private IVariable<Complex> _n1, _n2, _n3, _n4;
Expand Down
16 changes: 13 additions & 3 deletions SpiceSharpBSIM/SpiceSharpBSIM.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<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>
<AssemblyVersion>1.0.1</AssemblyVersion>
<Description>BSIM models for Spice#.</Description>
<Version>1.0.1</Version>
<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>
<FileVersion>1.0.1</FileVersion>
<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\**" />
Expand Down

0 comments on commit 01682a2

Please sign in to comment.