fix csharp jobs deps

This commit is contained in:
mvenditto 2023-06-20 21:55:43 +02:00 committed by AT
parent 380bbcf18f
commit 4a99e6662a

View File

@ -491,10 +491,6 @@ jobs:
trx2junit TestResults/*.trx trx2junit TestResults/*.trx
- store_test_results: - store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
- persist_to_workspace:
root: gpt4all-bindings/csharp
paths:
- runtimes/linux-x64/native
build-csharp-windows: build-csharp-windows:
executor: executor:
@ -506,22 +502,15 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
- gpt4all-csharp-nuget-packages-win - gpt4all-csharp-nuget-packages-win
- attach_workspace:
at: /tmp/workspace
- run: - run:
name: Install MinGW64 name: "Prepare Native Libs"
command: choco install -y mingw --force --no-progress
- run:
name: Install dependencies
command: | command: |
choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
- run:
name: Build C library
command: |
git submodule init
git submodule update --recursive
cd gpt4all-bindings/csharp cd gpt4all-bindings/csharp
$Env:Path += ";C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" mkdir -p runtimes/win-x64/native
$Env:Path += ";C:\Program Files\CMake\bin" cp /tmp/workspace/runtimes/win-x64/*.dll runtimes/win-x64/native/
./build_win-mingw.ps1 ls -R runtimes
- run: - run:
name: "Install project dependencies" name: "Install project dependencies"
command: | command: |
@ -550,10 +539,6 @@ jobs:
trx2junit TestResults/*.trx trx2junit TestResults/*.trx
- store_test_results: - store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
- persist_to_workspace:
root: gpt4all-bindings/csharp
paths:
- runtimes/win-x64/native/
build-csharp-macos: build-csharp-macos:
macos: macos:
@ -566,25 +551,16 @@ jobs:
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
brew install cmake
brew install --cask dotnet-sdk brew install --cask dotnet-sdk
# curl https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh - attach_workspace:
# chmod +x dotnet-install.sh at: /tmp/workspace
# ./dotnet-install.sh -Channel 7.0 --install-dir $HOME/cli-tools
# $HOME/cli-tools/dotnet --info
- run: - run:
name: Build C library name: "Prepare Native Libs"
command: | command: |
git submodule init
git submodule update --recursive
cd gpt4all-bindings/csharp cd gpt4all-bindings/csharp
BASE_DIR="runtimes/osx-x64" mkdir -p runtimes/osx-x64/native
NATIVE_DIR="$BASE_DIR/native" cp /tmp/workspace/runtimes/osx-x64/*.dylib runtimes/win-x64/native/
BUILD_DIR="$BASE_DIR/build" ls -R runtimes
mkdir -p "$NATIVE_DIR" "$BUILD_DIR"
cmake -S ../../gpt4all-backend -B "$BUILD_DIR" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build "$BUILD_DIR" -j --config Release
cp "$BUILD_DIR"/*.dylib "$NATIVE_DIR"
- run: - run:
name: "Install project dependencies" name: "Install project dependencies"
command: | command: |
@ -613,10 +589,6 @@ jobs:
trx2junit TestResults/*.trx trx2junit TestResults/*.trx
- store_test_results: - store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
- persist_to_workspace:
root: gpt4all-bindings/csharp
paths:
- runtimes/osx-x64/native
store-and-upload-nupkgs: store-and-upload-nupkgs:
docker: docker:
@ -705,18 +677,21 @@ workflows:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-linux
- build-csharp-windows: - build-csharp-windows:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-windows
- build-csharp-macos: - build-csharp-macos:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-macos
- store-and-upload-nupkgs: - store-and-upload-nupkgs:
filters: filters:
branches: branches: