try fix nuget cache issue on win and macos dotnet tool path

cmake-exportbuild
mvenditto 1 year ago committed by AT
parent 7805492c4f
commit a2d59b09e5

@ -371,7 +371,7 @@ jobs:
- checkout
- restore_cache:
keys:
- gpt4all-csharp-bindings
- gpt4all-csharp-nuget-packages-win
- run:
name: Install MinGW64
command: choco install -y mingw --force --no-progress
@ -396,7 +396,7 @@ jobs:
- save_cache:
paths:
- C:\Users\circleci\.nuget\packages
key: gpt4all-csharp-bindings
key: gpt4all-csharp-nuget-packages-win
- run:
name: Build C# Project
command: |
@ -433,8 +433,10 @@ jobs:
name: Install dependencies
command: |
brew install cmake
brew install dotnet@7
dotnet --info
curl https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh -Channel 7.0.1xx --install-dir $HOME/cli-tools
$HOME/cli-tools/dotnet --info
- run:
name: Build C library
command: |
@ -452,7 +454,7 @@ jobs:
name: "Install project dependencies"
command: |
cd gpt4all-bindings/csharp
dotnet restore Gpt4All
$HOME/cli-tools/dotnet restore Gpt4All
- save_cache:
paths:
- ~/.nuget/packages
@ -461,18 +463,19 @@ jobs:
name: Build C# Project
command: |
cd gpt4all-bindings/csharp
dotnet build Gpt4All --configuration Release
$HOME/cli-tools/dotnet build Gpt4All --configuration Release
- run:
name: "Run C# Tests"
command: |
cd gpt4all-bindings/csharp
dotnet test Gpt4All.Tests -v n --filter "SKIP_ON_CI!=True" --logger "trx"
$HOME/cli-tools/dotnet test Gpt4All.Tests -v n --filter "SKIP_ON_CI!=True" --logger "trx"
- run:
name: test results
command: |
cd gpt4all-bindings/csharp/Gpt4All.Tests
dotnet tool install -g trx2junit
$HOME/cli-tools/dotnet tool install -g trx2junit
export PATH="$PATH:$HOME/.dotnet/tools"
ls $HOME/.dotnet/tools
trx2junit TestResults/*.trx
- store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults

Loading…
Cancel
Save