Skip to content
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

CLI helper improvements #776

Merged
merged 17 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ _When adding new entries to the changelog, please include issue/PR numbers where
- Improved progress reporting during working-copy checkout. [#738](https://github.com/koordinates/kart/pull/738)
- Support for changing the primary key column of an existing dataset. [#238](https://github.com/koordinates/kart/issues/238)
- Help for the user get the working copy back into a valid state if a crash or similar causes it to become out of sync with the Kart repo. [#751](https://github.com/koordinates/kart/pull/751)
- Enable the background CLI helper on Linux & macOS in CI builds. The helper improves CLI performance significantly. [#776](https://github.com/koordinates/kart/pull/776)

## 0.11.5

Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ message(STATUS "Kart build version: ${KART_VERSION}")
#

option(USE_VCPKG "Use vcpkg for vendor dependencies")
option(CLI_HELPER "Default to the CLI helper on macOS & Linux")

if(MACOS OR LINUX)
option(CLI_HELPER "Enable the CLI helper on macOS & Linux" OFF)
endif()

set(VENDOR_ARCHIVE
""
CACHE
Expand Down Expand Up @@ -215,6 +219,7 @@ if(BUILD_TESTING)
NAME e2e-1
COMMAND tests/scripts/e2e-1.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set_tests_properties(e2e-1 PROPERTIES ENVIRONMENT "KART_USE_HELPER=0")

if(CLI_HELPER)
# Run the same test under Linux & Mac using the cli helper
Expand Down
4 changes: 4 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"displayName": "CI: Linux",
"inherits": "ci-base",
"generator": "Unix Makefiles",
"cacheVariables": {
"CLI_HELPER": "ON"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
Expand All @@ -36,6 +39,7 @@
"inherits": "ci-base",
"generator": "Unix Makefiles",
"cacheVariables": {
"CLI_HELPER": "ON",
"MACOS_SIGN_BUNDLE": "$env{MACOS_SIGN_BUNDLE}",
"MACOS_SIGN_PKG": "$env{MACOS_SIGN_PKG}",
"MACOS_NOTARIZE": "$env{MACOS_NOTARIZE}"
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ $ cmake --build build --target bundle
$ cmake --install build
```

Kart includes a background helper for improved command-line performance, but this
feature is disabled by default in development builds. To enable it, configure
Kart with `-DCLI_HELPER=ON`.

### Downloading vendor dependencies from CI

If you're having issues with VCPKG in the above, you can download a recent master-branch vendor CI artifact for your platform (eg: `vendor-macos-X64-py3.10.zip`).
Expand Down
4 changes: 4 additions & 0 deletions cli_helper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
add_executable(kart_cli_helper kart.c cJSON.c)

set_property(TARGET kart_cli_helper PROPERTY OUTPUT_NAME kart)
set_property(TARGET kart_cli_helper PROPERTY C_STANDARD 11)

target_compile_options(kart_cli_helper PRIVATE -Wall -Werror)
target_compile_definitions(kart_cli_helper PRIVATE "$<$<CONFIG:DEBUG>:DEBUG>")
Loading