Skip to content

Commit 01682a2

Browse files
Merge pull request #1 from SpiceSharp/development
Setup github actions and use gitinfo (ref. Spice#)
2 parents c85be29 + efb642c commit 01682a2

File tree

6 files changed

+139
-3
lines changed

6 files changed

+139
-3
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
release:
5+
branches: [ master ]
6+
types: [ published ]
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- uses: actions/checkout@master
14+
15+
- name: Setup dotnet tooling
16+
uses: actions/setup-dotnet@master
17+
with:
18+
dotnet-version: '8.0.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Compile Spice#
24+
run: dotnet build SpiceSharpBSIM\SpiceSharpBSIM.csproj --configuration Release --no-restore
25+
26+
- name: Publish to NuGet
27+
env:
28+
APIKEY: ${{ secrets.NUGET_APIKEY }}
29+
run: dotnet nuget push ".\build\bin\SpiceSharpBSIM\SpiceSharpBSIM.*.nupkg" -k $env:APIKEY -s "https://api.nuget.org/v3/index.json"
30+

.github/workflows/test-linux.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Linux Tests
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@master
18+
19+
- name: Setup dotnet tooling
20+
uses: actions/setup-dotnet@master
21+
with:
22+
dotnet-version: '8.0.x'
23+
24+
- name: Restore dependencies
25+
run: dotnet restore
26+
27+
- name: Compile Spice#.BSIM
28+
run: dotnet build SpiceSharpBSIM/SpiceSharpBSIM.csproj --configuration Debug --no-restore
29+
30+
- name: Compile Spice#.BSIM.Tests
31+
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore

.github/workflows/test-macos.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: MacOS Tests
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
build:
14+
runs-on: macos-latest
15+
16+
steps:
17+
- uses: actions/checkout@master
18+
19+
- name: Setup dotnet tooling
20+
uses: actions/setup-dotnet@master
21+
with:
22+
dotnet-version: '8.0.x'
23+
24+
- name: Restore dependencies
25+
run: dotnet restore
26+
27+
- name: Compile Spice#.BSIM
28+
run: dotnet build SpiceSharpBSIM/SpiceSharpBSIM.csproj --configuration Debug --no-restore
29+
30+
- name: Compile Spice#.BSIM.Tests
31+
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore

.github/workflows/test-windows.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Windows Tests
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@master
18+
19+
- name: Setup dotnet tooling
20+
uses: actions/setup-dotnet@master
21+
with:
22+
dotnet-version: '8.0.x'
23+
24+
- name: Restore dependencies
25+
run: dotnet restore
26+
27+
- name: Compile Spice#.BSIM
28+
run: dotnet build SpiceSharpBSIM/SpiceSharpBSIM.csproj --configuration Debug --no-restore
29+
30+
- name: Compile Spice#.BSIM.Test
31+
run: dotnet test SpiceSharpBSIMTests/SpiceSharpBSIMTests.csproj --configuration Debug --no-restore

SpiceSharpBSIM/Components/Semiconductors/BSIM/CorrelatedNoiseThermal.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
namespace SpiceSharpBSIM.Components.Semiconductors.BSIM
77
{
8+
/// <summary>
9+
/// A class that describes correlated thermal noise between multiple ports.
10+
/// </summary>
811
public class CorrelatedNoiseThermal : NoiseSource
912
{
1013
private IVariable<Complex> _n1, _n2, _n3, _n4;

SpiceSharpBSIM/SpiceSharpBSIM.csproj

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4+
<UseGitInfo>true</UseGitInfo>
5+
<GitTagRegex>v*</GitTagRegex>
46
<TargetFramework>netstandard2.0</TargetFramework>
57
<Title>Spice#.BSIM</Title>
68
<Authors>Sven Boulanger</Authors>
79
<PackageProjectUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</PackageProjectUrl>
810
<PackageReadmeFile>README.md</PackageReadmeFile>
911
<RepositoryUrl>https://github.com/SpiceSharp/SpiceSharpBSIM</RepositoryUrl>
10-
<AssemblyVersion>1.0.1</AssemblyVersion>
1112
<Description>BSIM models for Spice#.</Description>
12-
<Version>1.0.1</Version>
1313
<PackageIcon>logo_full.png</PackageIcon>
1414
<RepositoryType>git</RepositoryType>
1515
<PackageTags>circuit electronics netlist spice simulator simulation ode solver design</PackageTags>
1616
<PackageReleaseNotes>Refer to the GitHub release for release notes.</PackageReleaseNotes>
1717
<NeutralLanguage>en</NeutralLanguage>
18-
<FileVersion>1.0.1</FileVersion>
1918
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2019
</PropertyGroup>
2120

21+
<PropertyGroup Condition="'$(UseGitInfo)' == 'true'">
22+
<GitSkipCache>true</GitSkipCache>
23+
<GitBaseVersionRegex>^(?:\w+-)?v?(?&lt;MAJOR&gt;\d+)\.(?&lt;MINOR&gt;\d+)\.(?&lt;PATCH&gt;\d+)$</GitBaseVersionRegex>
24+
</PropertyGroup>
25+
<ItemGroup Condition="'$(UseGitInfo)' == 'true'">
26+
<PackageReference Include="GitInfo" Version="3.3.5">
27+
<PrivateAssets>all</PrivateAssets>
28+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
29+
</PackageReference>
30+
</ItemGroup>
31+
2232
<ItemGroup>
2333
<Compile Remove="Components\Semiconductors\BSIM\BSIM3v24\**" />
2434
<Compile Remove="Properties\**" />

0 commit comments

Comments
 (0)