Skip to content

Commit

Permalink
Update pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
pomianowski committed Aug 11, 2024
1 parent 3a01a90 commit f67857a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 40 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/wpf-ui-cd-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ jobs:
run: nuget restore Wpf.Ui.sln
- name: Build the solution
run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="x64" -p:GITHUB_ACTIONS=True
run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="x64" -p:ProductArchitecture="amd64" -p:GITHUB_ACTIONS=True
- name: Build the solution
run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="arm64" -p:ProductArchitecture="arm64" -p:GITHUB_ACTIONS=True
- uses: actions/upload-artifact@v4
with:
name: wpf-ui-vs22-extension
name: wpf-ui-vs22-extension-x64
path: src\Wpf.Ui.Extension\bin\x64\Release\Wpf.Ui.Extension.vsix
- uses: actions/upload-artifact@v4
with:
name: wpf-ui-vs22-extension-arm64
path: src\Wpf.Ui.Extension\bin\arm64\Release\Wpf.Ui.Extension.vsix
16 changes: 16 additions & 0 deletions .github/workflows/wpf-ui-cd-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
with:
dotnet-version: 8.x

- name: Fetch the certificate
run: |
$signing_keys_payload = [System.Convert]::FromBase64String("${{ secrets.STRONG_NAME_KEY }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath "src/lepo.snk"
[IO.File]::WriteAllBytes("$certificatePath", $signing_keys_payload)
- name: Install dependencies
run: dotnet restore

Expand All @@ -31,6 +38,9 @@ jobs:
- name: Build
run: dotnet build src\Wpf.Ui.Abstractions\Wpf.Ui.Abstractions.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true

- name: Build
run: dotnet build src\Wpf.Ui.DependencyInjection\Wpf.Ui.DependencyInjection.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true

- name: Build
run: dotnet build src\Wpf.Ui.Tray\Wpf.Ui.Tray.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true

Expand All @@ -39,3 +49,9 @@ jobs:

- name: Publish the symbols to NuGet.org
run: nuget push **\*.snupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json'

- name: Upload NuGet packages as artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: '**\*.nupkg'
41 changes: 3 additions & 38 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -44,46 +44,11 @@
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>

<!--
The following target has been ported from TerraFX.Interop.Windows.
See: https://github.com/terrafx/terrafx.interop.windows.
Using [module: SkipLocalsInit] suppresses the .init flag for local variables for the entire module.
This doesn't affect the correctness of methods in this assembly, as none of them are relying on the
JIT ensuring that all local memory is zeroed out to work. Doing this can provide some minor
performance benefits, depending on the workload.
-->
<PropertyGroup>
<GeneratedSkipLocalsInitFile Condition="'$(GeneratedSkipLocalsInitFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs</GeneratedSkipLocalsInitFile>
<GeneratedSkipLocalsInitFileLines>
<![CDATA[//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[module: global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]>
</GeneratedSkipLocalsInitFileLines>
<PropertyGroup Condition="'$(SourceLinkEnabled)' == 'true' AND '$(GeneratePackageOnBuild)' == 'true'">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(RepositoryDirectory)\src\lepo.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<Target Name="GenerateSkipLocalsInit"
BeforeTargets="BeforeCompile;CoreCompile"
DependsOnTargets="PrepareForBuild"
Condition="'$(Language)' == 'C#'"
Inputs="$(MSBuildAllProjects)"
Outputs="$(GeneratedSkipLocalsInitFile)">

<!-- Write the file with the attribute -->
<WriteLinesToFile Lines="$(GeneratedSkipLocalsInitFileLines)" Overwrite="true" WriteOnlyWhenDifferent="true" File="$(GeneratedSkipLocalsInitFile)" />

<!-- Include the generated file in the list of files to compile -->
<ItemGroup>
<Compile Include="$(GeneratedSkipLocalsInitFile)" />
</ItemGroup>
</Target>

<Target Name="WpfSourceLinkWorkaround" BeforeTargets="InitializeSourceRootMappedPaths" Condition="'$(UseWPF)' == 'true'">
<!-- WPF causes an error with SourceLink because its build targets create a temporary project without a PackageReference to SourceLink, see https://github.com/dotnet/sourcelink/issues/91,
causing the @SourceRoot property to be unexpectedly empty for the MapSourceRoot task
Expand Down

0 comments on commit f67857a

Please sign in to comment.