Skip to content

Add NuGet cache #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 24, 2024
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
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:

env:
IS_COVERAGE_ALLOWED: ${{ secrets.CODACY_PROJECT_TOKEN != '' }}
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

steps:
- uses: actions/checkout@v4
Expand All @@ -51,6 +52,18 @@ jobs:
# queries: security-extended,security-and-quality
queries: security-extended

- name: Cache NuGet
id: cache-nuget
uses: actions/cache@v3
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/global.json', '**/Directory.Packages.props', '**/Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Debug Cache
run: echo "Cache hit ${{ steps.cache-nuget.outputs.cache-hit }}"

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
Expand Down Expand Up @@ -109,6 +122,7 @@ jobs:

- name: Upload packages
uses: actions/upload-artifact@v4
if: success()
with:
name: packages-${{ matrix.os }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion build/targets/compiler/Compiler.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
<AssemblyAttribute Include="System.Runtime.InteropServices.ComVisibleAttribute">
<_Parameter1>false</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</ItemGroup>
</Project>
Loading