Skip to content

Commit

Permalink
Merge pull request #939 from dorssel/cache_and_pinning
Browse files Browse the repository at this point in the history
Fix package pinning and caching
  • Loading branch information
dorssel committed May 4, 2024
2 parents 92e5da3 + a5268a8 commit cd9c063
Show file tree
Hide file tree
Showing 15 changed files with 1,249 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ 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') }}
# NOTE: caching seems to actually slow down the build, both on hit and on miss
cache: false
cache-dependency-path: '**/packages.lock.json'

- name: Install dependencies
run: dotnet 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": {}
}
}
3 changes: 3 additions & 0 deletions Installer/packages.lock.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Frans van Dorsselaer

SPDX-License-Identifier: GPL-3.0-only
Loading

0 comments on commit cd9c063

Please sign in to comment.