Skip to content

Commit

Permalink
Fix package pinning and caching
Browse files Browse the repository at this point in the history
  • Loading branch information
dorssel committed May 3, 2024
1 parent 92e5da3 commit 3945090
Show file tree
Hide file tree
Showing 9 changed files with 1,231 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ jobs:

- name: Setup .NET
uses: actions/setup-dotnet@v4

- name: Cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', '**/global.json') }}
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Install dependencies
run: dotnet restore
run: dotnet restore --locked-mode

- name: Build
run: dotnet build --configuration Release --no-restore
Expand Down
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ SPDX-License-Identifier: GPL-3.0-only
<!-- For PowerShell, we support everything -->
<Platforms>AnyCPU</Platforms>
<Platform>AnyCPU</Platform>
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
<IsTrimmable>false</IsTrimmable>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework) != 'netstandard2.0'">
<!-- This product only supports x64 (the only architecture supported by VBoxUsb) -->
<Platforms>x64</Platforms>
<Platform>x64</Platform>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<IsTrimmable>true</IsTrimmable>
<!--
<IsAotCompatible>true</IsAotCompatible>
Expand All @@ -48,6 +50,10 @@ SPDX-License-Identifier: GPL-3.0-only

<!-- Common defaults -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<InvariantGlobalization>true</InvariantGlobalization>
<SelfContained>false</SelfContained>
<IsPackable>false</IsPackable>
Expand Down
32 changes: 32 additions & 0 deletions Installer/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": 2,
"dependencies": {
"native,Version=v0.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"WixToolset.Firewall.wixext": {
"type": "Direct",
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "ImdAKuoOkZcqPiIXmrcprM8Y1azA17EXZdUecpDD/V5jJcY+Ir4EtRLIWjYNno8FgUXRFyFskmAV13Us2SIInA=="
},
"WixToolset.UI.wixext": {
"type": "Direct",
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "bSXUeHrfylVOeoklBb3mSlmMmiIVmQnEakCLeEtQoUundgWY3LOlVr7yjLu/3RBkMCiYdGmaNhg7MHwS2iQDsA=="
},
"WixToolset.Util.wixext": {
"type": "Direct",
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "7lLwyrf+2cTuPju0swTWtRNYesnOMxXhGugMnGGNEPDB4g/+BCUsub2RDYAxnBnbnND7QmPwZnneLrTIQOdAbg=="
}
},
"native,Version=v0.0/win-x64": {}
}
}
Loading

0 comments on commit 3945090

Please sign in to comment.