More experiments

cmake-exportbuild
mvenditto 1 year ago committed by AT
parent 4a99e6662a
commit cac18c273e

@ -450,47 +450,50 @@ jobs:
docker: docker:
- image: mcr.microsoft.com/dotnet/sdk:7.0-jammy # Ubuntu 22.04 - image: mcr.microsoft.com/dotnet/sdk:7.0-jammy # Ubuntu 22.04
steps: steps:
- checkout - when:
- restore_cache: condition: << pipeline.parameters.run-csharp-workflow >>
keys: steps:
- gpt4all-csharp-nuget-packages-nix - checkout
- attach_workspace: - restore_cache:
at: /tmp/workspace keys:
- run: - gpt4all-csharp-nuget-packages-nix
name: "Prepare Native Libs" - attach_workspace:
command: | at: /tmp/workspace
cd gpt4all-bindings/csharp - run:
mkdir -p runtimes/linux-x64/native name: "Prepare Native Libs"
cp /tmp/workspace/runtimes/linux-x64/*.so runtimes/linux-x64/native/ command: |
ls -R runtimes cd gpt4all-bindings/csharp
- run: mkdir -p runtimes/linux-x64/native
name: "Install project dependencies" cp /tmp/workspace/runtimes/linux-x64/*.so runtimes/linux-x64/native/
command: | ls -R runtimes
cd gpt4all-bindings/csharp - run:
dotnet restore Gpt4All name: "Install project dependencies"
- save_cache: command: |
paths: cd gpt4all-bindings/csharp
- ~/.nuget/packages dotnet restore Gpt4All
key: gpt4all-csharp-nuget-packages-nix - save_cache:
- run: paths:
name: Build C# Project - ~/.nuget/packages
command: | key: gpt4all-csharp-nuget-packages-nix
cd gpt4all-bindings/csharp - run:
dotnet build Gpt4All --configuration Release --nologo name: Build C# Project
- run: command: |
name: "Run C# Tests" cd gpt4all-bindings/csharp
command: | dotnet build Gpt4All --configuration Release --nologo
cd gpt4all-bindings/csharp - run:
dotnet test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx" name: "Run C# Tests"
- run: command: |
name: Test results cd gpt4all-bindings/csharp
command: | dotnet test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx"
cd gpt4all-bindings/csharp/Gpt4All.Tests - run:
dotnet tool install -g trx2junit name: Test results
export PATH="$PATH:$HOME/.dotnet/tools" command: |
trx2junit TestResults/*.trx cd gpt4all-bindings/csharp/Gpt4All.Tests
- store_test_results: dotnet tool install -g trx2junit
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults export PATH="$PATH:$HOME/.dotnet/tools"
trx2junit TestResults/*.trx
- store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
build-csharp-windows: build-csharp-windows:
executor: executor:
@ -498,97 +501,103 @@ jobs:
size: large size: large
shell: powershell.exe -ExecutionPolicy Bypass shell: powershell.exe -ExecutionPolicy Bypass
steps: steps:
- checkout - when:
- restore_cache: condition: << pipeline.parameters.run-csharp-workflow >>
keys: steps:
- gpt4all-csharp-nuget-packages-win - checkout
- attach_workspace: - restore_cache:
at: /tmp/workspace keys:
- run: - gpt4all-csharp-nuget-packages-win
name: "Prepare Native Libs" - attach_workspace:
command: | at: /tmp/workspace
cd gpt4all-bindings/csharp - run:
mkdir -p runtimes/win-x64/native name: "Prepare Native Libs"
cp /tmp/workspace/runtimes/win-x64/*.dll runtimes/win-x64/native/ command: |
ls -R runtimes cd gpt4all-bindings/csharp
- run: mkdir -p runtimes/win-x64/native
name: "Install project dependencies" cp /tmp/workspace/runtimes/win-x64/*.dll runtimes/win-x64/native/
command: | ls -R runtimes
cd gpt4all-bindings/csharp - run:
dotnet.exe restore Gpt4All name: "Install project dependencies"
- save_cache: command: |
paths: cd gpt4all-bindings/csharp
- C:\Users\circleci\.nuget\packages dotnet.exe restore Gpt4All
key: gpt4all-csharp-nuget-packages-win - save_cache:
- run: paths:
name: Build C# Project - C:\Users\circleci\.nuget\packages
command: | key: gpt4all-csharp-nuget-packages-win
cd gpt4all-bindings/csharp - run:
dotnet.exe build Gpt4All --configuration Release --nologo name: Build C# Project
- run: command: |
name: "Run C# Tests" cd gpt4all-bindings/csharp
command: | dotnet.exe build Gpt4All --configuration Release --nologo
cd gpt4all-bindings/csharp - run:
dotnet.exe test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx" name: "Run C# Tests"
- run: command: |
name: Test results cd gpt4all-bindings/csharp
command: | dotnet.exe test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx"
cd gpt4all-bindings/csharp/Gpt4All.Tests - run:
dotnet tool install -g trx2junit name: Test results
$Env:Path += ";$Env:USERPROFILE\.dotnet\tools" command: |
trx2junit TestResults/*.trx cd gpt4all-bindings/csharp/Gpt4All.Tests
- store_test_results: dotnet tool install -g trx2junit
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults $Env:Path += ";$Env:USERPROFILE\.dotnet\tools"
trx2junit TestResults/*.trx
- store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
build-csharp-macos: build-csharp-macos:
macos: macos:
xcode: "14.0.0" xcode: "14.0.0"
steps: steps:
- checkout - when:
- restore_cache: condition: << pipeline.parameters.run-csharp-workflow >>
keys: steps:
- gpt4all-csharp-nuget-packages-nix - checkout
- run: - restore_cache:
name: Install dependencies keys:
command: | - gpt4all-csharp-nuget-packages-nix
brew install --cask dotnet-sdk - run:
- attach_workspace: name: Install dependencies
at: /tmp/workspace command: |
- run: brew install --cask dotnet-sdk
name: "Prepare Native Libs" - attach_workspace:
command: | at: /tmp/workspace
cd gpt4all-bindings/csharp - run:
mkdir -p runtimes/osx-x64/native name: "Prepare Native Libs"
cp /tmp/workspace/runtimes/osx-x64/*.dylib runtimes/win-x64/native/ command: |
ls -R runtimes cd gpt4all-bindings/csharp
- run: mkdir -p runtimes/osx-x64/native
name: "Install project dependencies" cp /tmp/workspace/runtimes/osx-x64/*.dylib runtimes/win-x64/native/
command: | ls -R runtimes
cd gpt4all-bindings/csharp - run:
dotnet restore Gpt4All name: "Install project dependencies"
- save_cache: command: |
paths: cd gpt4all-bindings/csharp
- ~/.nuget/packages dotnet restore Gpt4All
key: gpt4all-csharp-nuget-packages-nix - save_cache:
- run: paths:
name: Build C# Project - ~/.nuget/packages
command: | key: gpt4all-csharp-nuget-packages-nix
cd gpt4all-bindings/csharp - run:
dotnet build Gpt4All --configuration Release --nologo name: Build C# Project
- run: command: |
name: "Run C# Tests" cd gpt4all-bindings/csharp
command: | dotnet build Gpt4All --configuration Release --nologo
cd gpt4all-bindings/csharp - run:
dotnet test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx" name: "Run C# Tests"
- run: command: |
name: Test results cd gpt4all-bindings/csharp
command: | dotnet test Gpt4All.Tests -v n -c Release --filter "SKIP_ON_CI!=True" --logger "trx"
cd gpt4all-bindings/csharp/Gpt4All.Tests - run:
dotnet tool install -g trx2junit name: Test results
export PATH="$PATH:$HOME/.dotnet/tools" command: |
trx2junit TestResults/*.trx cd gpt4all-bindings/csharp/Gpt4All.Tests
- store_test_results: dotnet tool install -g trx2junit
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults export PATH="$PATH:$HOME/.dotnet/tools"
trx2junit TestResults/*.trx
- store_test_results:
path: gpt4all-bindings/csharp/Gpt4All.Tests/TestResults
store-and-upload-nupkgs: store-and-upload-nupkgs:
docker: docker:
@ -664,83 +673,75 @@ workflows:
- build-py-windows - build-py-windows
- build-py-linux - build-py-linux
- build-py-macos - build-py-macos
build-csharp-deploy: build-bindings:
when: << pipeline.parameters.run-csharp-workflow >> when:
or:
- << pipeline.parameters.run-python-workflow >>
- << pipeline.parameters.run-csharp-workflow >>
jobs: jobs:
- nuget-hold:
type: approval
- hold: - hold:
type: approval type: approval
- build-csharp-linux: - nuget-hold:
type: approval
- build-bindings-backend-linux:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-linux - build-bindings-backend-macos:
- build-csharp-windows:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-windows - build-bindings-backend-windows:
- build-csharp-macos:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - hold
- build-bindings-backend-macos - build-bindings-backend-windows-msvc:
- store-and-upload-nupkgs:
filters: filters:
branches: branches:
only: only:
requires: requires:
- nuget-hold - hold
- build-csharp-windows - build-bindings-backend-debug:
- build-csharp-linux
- build-csharp-macos
build-bindings-backend:
when:
or:
- << pipeline.parameters.run-python-workflow >>
- << pipeline.parameters.run-csharp-workflow >>
jobs:
- hold:
type: approval
- build-bindings-backend-linux:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - build-bindings-backend-linux
- build-bindings-backend-macos: - build-bindings-backend-macos
- build-bindings-backend-windows
- build-bindings-backend-windows-msvc
# CSharp Jobs
- build-csharp-linux:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - build-bindings-backend-linux
- build-bindings-backend-windows: - build-csharp-windows:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - build-bindings-backend-windows
- build-bindings-backend-windows-msvc: - build-csharp-macos:
filters: filters:
branches: branches:
only: only:
requires: requires:
- hold - build-bindings-backend-macos
- build-bindings-backend-debug: - store-and-upload-nupkgs:
filters: filters:
branches: branches:
only: only:
requires: requires:
- build-bindings-backend-linux - nuget-hold
- build-bindings-backend-macos - build-csharp-windows
- build-bindings-backend-windows - build-csharp-linux
- build-bindings-backend-windows-msvc - build-csharp-macos
Loading…
Cancel
Save