Ensure local dotnet tools are restored on Linux and for CI

Windows users can do it manually if VS doesn't, at least until #3013
This commit is contained in:
YoshiRulz 2024-06-07 15:46:46 +10:00
parent 5c31711710
commit 8f7e613398
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@ jobs:
dotnet-version: "8"
- name: Test
run: dotnet test BizHawk.sln -c Release -p:ContinuousIntegrationBuild=true
run: dotnet tool restore && dotnet test BizHawk.sln -c Release -p:ContinuousIntegrationBuild=true
shell: pwsh
package:

View File

@ -12,4 +12,5 @@ if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages";
printf "running 'dotnet %s' in %s configuration, extra args: %s\n" "$cmd" "$config" "$*"
version=$(grep -Po "MainVersion = \"\K(.*)(?=\")" src/BizHawk.Common/VersionInfo.cs)
git_hash="$(git rev-parse --verify HEAD 2>/dev/null || printf "0000000000000000000000000000000000000000")"
dotnet tool restore >/dev/null || (echo "dotnet tool restore failed"; exit 1)
dotnet "$cmd" BizHawk.sln -c "$config" -m -clp:NoSummary -p:Version="$version" -p:SourceRevisionId="$git_hash" "$@"