-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce packaging, distribution and documentation for the C# driver #623
Merged
Merged
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
01defb8
Fix dependency ref and comment out excessive .factory builds
farost 73bb791
Add csharp tests to automation. Update maven artifacts
farost 07194f0
Refactor error messages codes. Update deps
farost 70d3c11
Start the quickstart test, several experiments. Wip
farost 472f171
Progress on the quickstart test
farost e9c9462
Complete two versions of the quickstart test, gonna refactor later
farost c7ab812
Refactor and clean integration tests
farost 3919aad
Rename test fixture
farost 958fd6e
Add more usages of concepts to the quickstart test
farost f27ffbd
Rename Quickstart -> Examples
farost 8ffe135
Start adding documentation
farost e8cc668
Fix checkstyle
farost 1fbf274
Add doxygen html generation, wip
farost 2f68070
Fix references in the common build
farost 162b93a
Refactor Properties <-> Methods. Fix some documentation
farost f1b57a5
Start the quickstart test, several experiments. Wip
farost d5ec18a
Resolve conflictsRefactor and clean integration tests
farost 0ae72e3
Fix rebase conflicts.
farost 4b40d1b
Fix conflicts for Quickstart and Examples tests.
farost 24f5a98
Fix conflicts. Rebase + resolve conflicts
farost 2c28045
Fix references to doxygen
farost c3522e4
Prepare rule calls for the docs
farost ca9bbd7
Add template for csharp parser
farost cbc0e1f
Fix cpp parser
farost d6345bf
Fix parser to just get anything
farost 0debecb
Add structs to generation
farost fe06410
Add test logs
farost 2f9c7af
Progress with c# docs
farost 893240b
Temporarily comment out factory builds
farost 7083f63
Add enums without examples to the parser, fix some generations and names
farost 27de3ff
Add enums and fix naming choosing in the parser
farost 3e51a97
Add code examples for method for the cpp driver
farost 710b49a
Refactor enums parsing, add basic docs
farost 5159b64
Fix lang ref. Add examples for methods
farost 3edf7c7
Finish generated docs for C#, fix automation.yml, README and integrat…
farost 482dd44
Update deps temporarily
farost c0ac949
Fix integration tests
farost 8551d4b
Fix merge conflicts in error messages
farost 593c371
Fix typos
farost fc53872
Fix copyright header
farost c583730
Add static members generation for docs
farost 79ca5f8
Update deps ref for static members generation
farost 62500cb
Fix c parser bug with old files
farost 5647f1f
Add paket.lock file to git: https://fsprojects.github.io/Paket/faq.ht…
farost 5b3f418
Fix checkstyle by ignoring paket.lock
farost 93dd34e
Change output dlls names to align with namespaces
farost c647b09
Fix argument type parsing error for CS, CPP and C. Not pushing CS for…
farost 45002bf
Fix multi-templated arguments
farost b50de9b
Fix scary See also
farost b13fa96
Format See also
farost 5fa052a
Fix indentation for See also targets
farost 9087951
Fix tables width, add zero-width whitespaces for C, CPP, C#
farost 2b2c005
Remove excessive files
farost aa2f453
Add nuget pack calls without the impl (temporarily)
farost f6d1e14
Add first automatic packaging try
farost 3efdfa7
Start circleci, fix BUILD for non-mac
farost a17a6aa
Make packs special for each os
farost a464ba0
Add deployment test
farost 37e8a83
Add nuget push call
farost 903ace4
Sync with updated bazel distr repo
farost e11b712
Add two options to build packages: separate and merged ones
farost f34ff88
Refactor rules, added steps to the circleci scripts
farost f6a95f1
Fix builds and docs after merges
farost 5e350fd
Fix some docs
farost 632b3a7
Fix checkstyle. Change packages content
farost 39739ee
Fix build, prepare csproj for test
farost 0c3d270
Refactor rules to produce platform-specific native packages and push …
farost 1aecd9e
Fix build with platforms
farost 7b5634c
Remove excessive flag
farost 1153f6c
Remove direct version specification in the rules
farost 46c1e90
Enable snapshot tests for my branch
farost a0ed6ab
Comment out excessive steps. Prepare test project for c#
farost a1b6aae
Fix circleci
farost bcbcc3b
Fix circleci by removing sudo
farost 1377681
Return globalization envvar export
farost 9a5ed62
Pass action env to bazel run
farost e876f47
Temporarily disable win and mac builds
farost 2d07d5a
Disable windows builds
farost 7fb7d28
Try to fix linux build by host_action_env
farost 173f75e
Connect host_action_env with action_env
farost 8dad32e
Update readme. Disable linux temp
farost fb7816b
Add envvar for the mac installation, fix linux installation
farost 0bdb4e3
Fix circleci
farost c72cc88
Fix linux build, uncomment steps
farost 1317613
Change project descriptions
farost 47a6e34
Fix linux deps
farost a682e22
Add readme to the packages. Comment out windows temporarily
farost bf6c2cb
Fix windows build, return windows steps
farost cc217c0
Turn windows off again...
farost 8b33201
Change /bazel -> /b
farost 95d9c03
Enable windows to run python scripts. Update mac deps for dotnet
farost 1f8e677
Try fixing macos and windows circleci
farost 221935c
Add a series of test changes for circleci
farost 4b94322
Fix circleci
farost af1d63d
Add another try for mac and linux
farost 42c2f01
Fix config.yml
farost f4d6466
Add install script for mac dotnet for tests
farost fc29f90
Remove comments from config.yml for build fix
farost fba3e50
Remove linux from builds, experiment with mac
farost 5be8318
Turn off everything except of dotnet mac
farost ab1a2ca
Test dotnet install for mac
farost a552b3a
Turn test snapshot any off
farost fe39c41
Fix build
farost fd2eed5
Add find dotnet for mac builds
farost 80c72f6
Add ln for mac installation
farost 5f4581e
Add additional logs, fix versioning for tests
farost d207070
Remove requires for windows
farost 6e6f13a
Return windows snapshot deploy
farost a54dfc4
Comment out excessive rules
farost 343f8f7
Update ref with more runtimes
farost 5b386b4
Return all the new build steps, update refs with fixes
farost 92784e3
Fix config style
farost d6cdd18
Fix windows runtime deployment scripts
farost c433ef6
Remove excessive spaces
farost 3bc11e0
Add sleeps for the mac tests
farost 6e64940
Fix release config + fix issue #613
farost b40940d
Fix docs for the updated method in python
farost 035c7c3
Return builds, fix comments and refs
farost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -349,6 +349,81 @@ commands: | |
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD | ||
bazel run --jobs=8 --define version=$(cat VERSION) //cpp:deploy-cpp-driver --compilation_mode=opt -- release | ||
|
||
######################### | ||
# C# deployment steps # | ||
######################### | ||
|
||
install-dotnet-mac: | ||
steps: | ||
- run: | | ||
curl -OL "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh" | ||
chmod a+x dotnet-install.sh | ||
./dotnet-install.sh --version 6.0.125 | ||
ln -s /Users/distiller/.dotnet/dotnet /usr/local/bin/ | ||
|
||
install-dotnet-mac-rosetta: | ||
steps: | ||
- install-brew-rosetta | ||
- run: | | ||
curl -OL "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh" | ||
chmod a+x dotnet-install.sh | ||
./dotnet-install.sh --version 6.0.125 | ||
ln -s /Users/distiller/.dotnet/dotnet /usr/local/bin/ | ||
|
||
install-dotnet-linux: | ||
steps: | ||
- run: | | ||
rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm | ||
yum install -y dotnet-sdk-6.0 | ||
|
||
install-libicu-linux: | ||
steps: | ||
- run: yum install -y libicu60 | ||
|
||
deploy-dotnet-runtime-snapshot-unix: | ||
steps: | ||
- run: | | ||
export DEPLOY_NUGET_API_KEY=$REPO_TYPEDB_PASSWORD | ||
bazel run --jobs=8 --define version=0.0.0-$(git rev-parse HEAD) //csharp:driver-csharp-runtime-push -- snapshot | ||
|
||
deploy-dotnet-snapshot-unix: | ||
steps: | ||
- run: | | ||
export DEPLOY_NUGET_API_KEY=$REPO_TYPEDB_PASSWORD | ||
bazel run --jobs=8 --define version=0.0.0-$(git rev-parse HEAD) //csharp:driver-csharp-push -- snapshot | ||
|
||
test-dotnet-snapshot-unix: | ||
steps: | ||
- run: | | ||
tool/test/start-core-server.sh | ||
sleep 3 | ||
sed -i -e "s/DRIVER_CSHARP_VERSION_MARKER/0.0.0-$CIRCLE_SHA1/g" csharp/Test/Deployment/NugetApplicationTest.csproj | ||
cat csharp/Test/Deployment/NugetApplicationTest.csproj | ||
(cd csharp/Test/Deployment && dotnet run NugetApplicationTest.csproj) | ||
tool/test/stop-core-server.sh | ||
|
||
test-dotnet-snapshot-mac-rosetta: | ||
steps: | ||
- run: | | ||
tool/test/start-core-server.sh | ||
sleep 3 | ||
sed -i -e "s/DRIVER_CSHARP_VERSION_MARKER/0.0.0-$CIRCLE_SHA1/g" csharp/Test/Deployment/NugetApplicationTest.csproj | ||
cat csharp/Test/Deployment/NugetApplicationTest.csproj | ||
(cd csharp/Test/Deployment && /usr/local/bin/dotnet run NugetApplicationTest.csproj) | ||
tool/test/stop-core-server.sh | ||
|
||
deploy-dotnet-runtime-release-unix: | ||
steps: | ||
- run: | | ||
export DEPLOY_NUGET_API_KEY=$REPO_NUGET_TOKEN | ||
bazel run --jobs=8 --define version=$(cat VERSION) //csharp:driver-csharp-runtime-push --compilation_mode=opt -- release | ||
|
||
deploy-dotnet-release-unix: | ||
steps: | ||
- run: | | ||
export DEPLOY_NUGET_API_KEY=$REPO_NUGET_TOKEN | ||
bazel run --jobs=8 --define version=$(cat VERSION) //csharp:driver-csharp-push --compilation_mode=opt -- release | ||
|
||
######################### | ||
# Rust deployment steps # | ||
######################### | ||
|
@@ -430,6 +505,9 @@ jobs: | |
- test-cpp-assembly-linux: | ||
target-arch: arm64 | ||
|
||
- install-libicu-linux | ||
- deploy-dotnet-runtime-snapshot-unix | ||
|
||
deploy-snapshot-linux-x86_64: | ||
executor: linux-x86_64-amazonlinux-2 | ||
steps: | ||
|
@@ -449,6 +527,9 @@ jobs: | |
- test-cpp-assembly-linux: | ||
target-arch: x86_64 | ||
|
||
- install-libicu-linux | ||
- deploy-dotnet-runtime-snapshot-unix | ||
|
||
deploy-snapshot-mac-arm64: | ||
executor: mac-arm64 | ||
steps: | ||
|
@@ -470,6 +551,8 @@ jobs: | |
- test-cpp-assembly-mac: | ||
target-arch: arm64 | ||
|
||
- deploy-dotnet-runtime-snapshot-unix | ||
|
||
deploy-snapshot-mac-x86_64: | ||
executor: mac-arm64 | ||
steps: | ||
|
@@ -492,6 +575,8 @@ jobs: | |
- test-cpp-assembly-mac: | ||
target-arch: x86_64 | ||
|
||
- deploy-dotnet-runtime-snapshot-unix | ||
|
||
deploy-snapshot-windows-x86_64: | ||
executor: | ||
name: win/default | ||
|
@@ -512,6 +597,8 @@ jobs: | |
- run: .circleci\windows\cpp\deploy_snapshot.bat | ||
- run: .circleci\windows\cpp\test_assembly.bat | ||
|
||
- run: .circleci\windows\csharp\deploy_snapshot.bat | ||
|
||
deploy-snapshot-any: | ||
executor: linux-x86_64-ubuntu-2204 | ||
steps: | ||
|
@@ -522,6 +609,7 @@ jobs: | |
- deploy-maven-snapshot-unix | ||
- install-npm-apt | ||
- deploy-npm-snapshot-unix | ||
- deploy-dotnet-snapshot-unix | ||
|
||
test-snapshot-linux-arm64: | ||
executor: linux-arm64-amazonlinux-2 | ||
|
@@ -532,6 +620,9 @@ jobs: | |
- test-pip-snapshot-unix | ||
- install-maven-linux | ||
- test-maven-snapshot-unix | ||
- install-dotnet-linux | ||
- install-libicu-linux | ||
- test-dotnet-snapshot-unix | ||
|
||
test-snapshot-linux-x86_64: | ||
executor: linux-x86_64-amazonlinux-2 | ||
|
@@ -542,6 +633,8 @@ jobs: | |
- test-pip-snapshot-unix | ||
- install-maven-linux | ||
- test-maven-snapshot-unix | ||
- install-dotnet-linux | ||
- test-dotnet-snapshot-unix | ||
|
||
test-snapshot-mac-arm64: | ||
executor: mac-arm64 | ||
|
@@ -552,6 +645,8 @@ jobs: | |
- test-pip-snapshot-unix | ||
- install-maven-mac | ||
- test-maven-snapshot-unix | ||
- install-dotnet-mac | ||
- test-dotnet-snapshot-unix | ||
|
||
test-snapshot-mac-x86_64: | ||
executor: mac-arm64 | ||
|
@@ -563,6 +658,8 @@ jobs: | |
- test-pip-snapshot-mac-rosetta | ||
- install-maven-mac-rosetta | ||
- test-maven-snapshot-mac-rosetta | ||
- install-dotnet-mac-rosetta | ||
- test-dotnet-snapshot-mac-rosetta | ||
|
||
test-snapshot-windows-x86_64: | ||
executor: | ||
|
@@ -575,6 +672,7 @@ jobs: | |
- run: .circleci\windows\prepare.bat | ||
- run: .circleci\windows\python\test_deploy_snapshot.bat | ||
- run: .circleci\windows\java\test_deploy_snapshot.bat | ||
- run: .circleci\windows\csharp\test_deploy_snapshot.bat | ||
|
||
test-snapshot-any: | ||
executor: linux-x86_64-ubuntu-2204 | ||
|
@@ -600,6 +698,9 @@ jobs: | |
- deploy-clib-release-unix | ||
- deploy-cpp-release-unix | ||
|
||
- install-libicu-linux | ||
- deploy-dotnet-runtime-release-unix | ||
|
||
deploy-release-linux-x86_64: | ||
executor: linux-x86_64-amazonlinux-2 | ||
steps: | ||
|
@@ -611,6 +712,9 @@ jobs: | |
- deploy-clib-release-unix | ||
- deploy-cpp-release-unix | ||
|
||
- install-libicu-linux | ||
- deploy-dotnet-runtime-release-unix | ||
|
||
deploy-release-mac-arm64: | ||
executor: mac-arm64 | ||
steps: | ||
|
@@ -621,6 +725,7 @@ jobs: | |
- deploy-maven-jni-release-unix | ||
- deploy-clib-release-unix | ||
- deploy-cpp-release-unix | ||
- deploy-dotnet-runtime-release-unix | ||
|
||
deploy-release-mac-x86_64: | ||
executor: mac-arm64 | ||
|
@@ -633,6 +738,7 @@ jobs: | |
- deploy-maven-jni-release-unix | ||
- deploy-clib-release-unix | ||
- deploy-cpp-release-unix | ||
- deploy-dotnet-runtime-release-unix | ||
|
||
deploy-release-windows-x86_64: | ||
executor: | ||
|
@@ -647,6 +753,7 @@ jobs: | |
- run: .circleci\windows\java\deploy_release.bat | ||
- run: .circleci\windows\clib\deploy_release.bat | ||
- run: .circleci\windows\cpp\deploy_release.bat | ||
- run: .circleci\windows\csharp\deploy_release.bat | ||
|
||
deploy-release-any: | ||
executor: linux-x86_64-ubuntu-2204 | ||
|
@@ -658,6 +765,7 @@ jobs: | |
- deploy-maven-release-unix | ||
- install-npm-apt | ||
- deploy-npm-release-unix | ||
- deploy-dotnet-release-unix | ||
|
||
deploy-github: | ||
executor: linux-x86_64-ubuntu-2204 | ||
|
@@ -697,26 +805,29 @@ jobs: | |
apt install -y git | ||
git push --delete https://[email protected]/vaticle/typedb-driver.git $CIRCLE_BRANCH | ||
|
||
|
||
workflows: | ||
typedb-driver-snapshot: | ||
jobs: | ||
- deploy-snapshot-linux-arm64: | ||
filters: | ||
branches: | ||
only: [development, master] | ||
|
||
- deploy-snapshot-linux-x86_64: | ||
filters: | ||
branches: | ||
only: [development, master] | ||
|
||
- deploy-snapshot-mac-arm64: | ||
filters: | ||
branches: | ||
only: [development, master] | ||
|
||
- deploy-snapshot-mac-x86_64: | ||
filters: | ||
branches: | ||
only: [development, master] | ||
|
||
- deploy-snapshot-windows-x86_64: | ||
filters: | ||
branches: | ||
|
@@ -740,27 +851,31 @@ workflows: | |
requires: | ||
- deploy-snapshot-linux-arm64 | ||
- deploy-snapshot-any | ||
|
||
- test-snapshot-linux-x86_64: | ||
filters: | ||
branches: | ||
only: [master] | ||
requires: | ||
- deploy-snapshot-linux-x86_64 | ||
- deploy-snapshot-any | ||
|
||
- test-snapshot-mac-arm64: | ||
filters: | ||
branches: | ||
only: [master] | ||
requires: | ||
- deploy-snapshot-mac-arm64 | ||
- deploy-snapshot-any | ||
|
||
- test-snapshot-mac-x86_64: | ||
filters: | ||
branches: | ||
only: [master] | ||
requires: | ||
- deploy-snapshot-mac-x86_64 | ||
- deploy-snapshot-any | ||
|
||
- test-snapshot-windows-x86_64: | ||
filters: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ SET DEPLOY_ARTIFACT_USERNAME=%REPO_TYPEDB_USERNAME% | |
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD% | ||
|
||
SET /p VER=<VERSION | ||
bazel --output_user_root=C:\bazel run --verbose_failures --define version=%VER% //c:deploy-windows-x86_64-zip --compilation_mode=opt -- release | ||
bazel --output_user_root=C:\b run --verbose_failures --define version=%VER% //c:deploy-windows-x86_64-zip --compilation_mode=opt -- release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We lack symbols for Windows path. It started failing even within the Rust build steps, so we can't even change these names. Right now it has just several free symbols until 260... |
||
IF %errorlevel% NEQ 0 EXIT /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@echo off | ||
REM Licensed to the Apache Software Foundation (ASF) under one | ||
REM or more contributor license agreements. See the NOTICE file | ||
REM distributed with this work for additional information | ||
REM regarding copyright ownership. The ASF licenses this file | ||
REM to you under the Apache License, Version 2.0 (the | ||
REM "License"); you may not use this file except in compliance | ||
REM with the License. You may obtain a copy of the License at | ||
REM | ||
REM http://www.apache.org/licenses/LICENSE-2.0 | ||
REM | ||
REM Unless required by applicable law or agreed to in writing, | ||
REM software distributed under the License is distributed on an | ||
REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
REM KIND, either express or implied. See the License for the | ||
REM specific language governing permissions and limitations | ||
REM under the License. | ||
|
||
REM needs to be called such that software installed | ||
REM by Chocolatey in prepare.bat is accessible | ||
CALL refreshenv | ||
|
||
ECHO Building and deploying windows package... | ||
SET DEPLOY_NUGET_API_KEY=%REPO_NUGET_TOKEN% | ||
|
||
SET /p VER=<VERSION | ||
bazel --output_user_root=C:/b run --verbose_failures --define version=%VER% //csharp:driver-csharp-runtime-push --compilation_mode=opt -- release | ||
IF %errorlevel% NEQ 0 EXIT /b %errorlevel% |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't fully work on CircleCI, but it has some successful passes for some platforms (the whole workflow), so you can have a look. I'll put another comment once it's in the final state.