Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKuschnik committed Mar 19, 2024
2 parents 2ae7f3d + 8b78798 commit dfb9d60
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
echo "${{ secrets.PRIVATE_KEY }}" > WmiLight\private_key.base64
certutil -decode WmiLight\private_key.base64 WmiLight\private_key.snk
rm WmiLight\private_key.base64 -v
- name: Build .Net Lib
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} WmiLight\WmiLight.csproj
- name: Cleanup Private Key
run: rm WmiLight\private_key.snk -v
Expand All @@ -58,6 +55,29 @@ jobs:
- name: Build Native static Lib (x86, NoOp)
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:ConfigurationType=StaticLibrary /p:WholeProgramOptimization=false /p:Platform=x86 WmiLight.Native\WmiLight.Native.vcxproj

- name: Restore NuGet Package for Unit Tests
run: msbuild WmiLight.UnitTests\WmiLight.UnitTests.csproj -t:restore -p:RestorePackagesConfig=true

- name: Build Unit Tests (x64)
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 WmiLight.UnitTests\WmiLight.UnitTests.csproj

- name: Build Unit Tests (x86)
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 WmiLight.UnitTests\WmiLight.UnitTests.csproj

- name: Run Unit Tests (x64)
uses: MartinKuschnik/vstest-action-with-space-support@v1.0.1
with:
testAssembly: '*UnitTests*.dll'
searchFolder: '**\*'
platform: x64

- name: Run Unit Tests (x86)
uses: MartinKuschnik/vstest-action-with-space-support@v1.0.1
with:
testAssembly: '*UnitTests*.dll'
searchFolder: '**\*'
platform: x86

- name: Pack with dotnet
run: dotnet pack WmiLight\WmiLight.csproj --configuration ${{env.BUILD_CONFIGURATION}} --output nuget-packages --no-build
Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
</PropertyGroup>
</Project>

0 comments on commit dfb9d60

Please sign in to comment.