Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
environment: ${{ needs.preflight.outputs.package-env }}
permissions:
contents: read
env:
NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages
strategy:
fail-fast: false
matrix:
Expand All @@ -93,24 +95,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Install Windows SDK UAP platform
shell: pwsh
run: |
# CsWinRT in WindowsPackageManager.Interop requires UAP 10.0.19041.0 platform metadata
$VsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$VsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
$InstallPath = & $VsWhere -latest -property installationPath
& $VsInstaller modify --installPath $InstallPath `
--add Microsoft.VisualStudio.Component.UWP.Support `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--quiet --norestart --nocache | Out-Default
Write-Host "Windows SDK UAP platform installed"
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install Python
uses: actions/setup-python@v6
with:
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,32 @@ on:
jobs:
test-codebase:
runs-on: windows-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages

steps:
- name: Checkout the repository
uses: actions/checkout@v6
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install Windows SDK UAP platform
shell: pwsh
run: |
# CsWinRT in WindowsPackageManager.Interop requires UAP 10.0.19041.0 platform metadata
$VsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$VsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
$InstallPath = & $VsWhere -latest -property installationPath
& $VsInstaller modify --installPath $InstallPath `
--add Microsoft.VisualStudio.Component.UWP.Support `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--quiet --norestart --nocache | Out-Default
Write-Host "Windows SDK UAP platform installed"

# - name: Install WinGet
# uses: Cyberboss/install-winget@v1
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Install dependencies
working-directory: src
run: dotnet restore UniGetUI.sln

# - name: Test build
# working-directory: src
# run: dotnet build --configuration Release

- name: Run Tests
working-directory: src
run: dotnet test UniGetUI.sln --no-restore --verbosity q --nologo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
https://github.com/microsoft/CsWinRT/blob/master/nuget/readme.md
-->
<PropertyGroup>
<CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata>
<CsWinRTWindowsMetadata Condition="'$(PkgMicrosoft_Windows_SDK_Contracts)' != ''">$(PkgMicrosoft_Windows_SDK_Contracts)\ref\netstandard2.0</CsWinRTWindowsMetadata>
<CsWinRTWindowsMetadata Condition="'$(PkgMicrosoft_Windows_SDK_Contracts)' == ''">10.0.26100.0</CsWinRTWindowsMetadata>
<CsWinRTIncludes>Microsoft.Management.Deployment</CsWinRTIncludes>
</PropertyGroup>

Expand All @@ -29,6 +30,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.26100.4948">
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>none</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Loading