Skip to content

Commit

Permalink
Merge pull request #776 from koordinates/fix-cli-helper
Browse files Browse the repository at this point in the history
CLI helper improvements
  • Loading branch information
olsen232 committed Jan 23, 2023
2 parents 639da8a + 57d106c commit 241c67d
Show file tree
Hide file tree
Showing 10 changed files with 422 additions and 114 deletions.
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

0 comments on commit 241c67d

Please sign in to comment.