From 8f7e613398a019462ca3ea4d9c76b750e9c9ab02 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 7 Jun 2024 15:46:46 +1000 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 2 +- Dist/.InvokeCLIOnMainSln.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 969b4c8d5a..6d539afc8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/Dist/.InvokeCLIOnMainSln.sh b/Dist/.InvokeCLIOnMainSln.sh index fa09f31098..52750bca14 100755 --- a/Dist/.InvokeCLIOnMainSln.sh +++ b/Dist/.InvokeCLIOnMainSln.sh @@ -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" "$@"