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

Add Python API support #249

Open
wants to merge 148 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
ae6d5fb
cli: Add deploy command
cassava Jul 17, 2023
b228005
cli: Fail when patchelf does not exist
cassava Jul 25, 2023
b7f59c3
cli: Disable pylint logging-fstring-interpolation
cassava Jul 25, 2023
9957b1e
cli: Improve error handling of patch_rpath
cassava Jul 25, 2023
78bf138
cli: Refactor cloe_utils into binutils and procutils
cassava Jul 25, 2023
14e40a4
cli: Simplify conan argument passing
cassava Aug 1, 2023
ff3c096
cli: Improve cloe-launch command help messages
cassava Aug 3, 2023
ad22261
cli: Fix usage error in README
cassava Aug 3, 2023
8679cee
cli: Fix conanfile.py referring to missing setup.py
cassava Aug 3, 2023
2df25c3
cli: Fix broken Makefile failing to install .
cassava Aug 4, 2023
0b80549
cli: Fix allow_interspersed_args not inherited anymore
cassava Aug 4, 2023
e4affed
cli: Fix rpath list being modified
cassava Dec 5, 2023
098c56d
cli: Update default build policy from outdated to cascade
cassava Nov 15, 2023
5a76bcb
cli: Provide help for common errors
cassava Nov 29, 2023
fac9e1e
cli: Add --ignore-plugin-setups option
cassava Mar 28, 2024
a8a3b82
cli: Prevent . from being added to CLOE_PLUGIN_PATH
cassava Mar 28, 2024
740b6fd
cli: Fix cloe-launch prepare not showing output.
cassava Mar 28, 2024
b535133
tooling: Add deploy/ to .gitignore
cassava Jul 26, 2023
532c303
models: Add OSI-Sensor
clsim Nov 27, 2023
6185f83
runtime: Add parse_duration() function
cassava May 10, 2023
52118f6
engine: Remove --distinct option from check command
cassava Mar 10, 2023
ed09d52
engine: Set stack options in own scope
cassava Mar 16, 2023
6c60311
engine(lua): Add `lua` trigger action proof-of-concept
cassava Nov 8, 2022
43c1431
engine(lua): Add initial Lua integration
cassava Feb 8, 2023
322c87d
engine(lua): Handle lua path better
cassava Apr 24, 2023
e3a71d2
engine(lua): Add tests for Lua integration
cassava Apr 24, 2023
7f0309d
engine(lua): Restructure Lua integration for better development
cassava May 10, 2023
86f822c
engine: Extract SimulationProgress into simulation_progress.hpp
cassava May 10, 2023
f368788
engine(lua): Add cloe.log() function to lua API
cassava May 10, 2023
bd38b83
engine(lua): Remove outdated lua API functions
cassava May 10, 2023
a57341f
engine: Fix error in CMakeLists.txt -> fixup!
cassava May 10, 2023
791284d
engine(lua): Add test_lua02.lua
cassava May 10, 2023
7148401
engine(lua): Add cloe.api.duration table
cassava May 10, 2023
2eaa938
engine(lua): Refactor cloe.lua to cloe/init.lua
cassava May 11, 2023
3ac09d7
engine(lua): Integrate inspect.lua library into cloe
cassava May 11, 2023
af55abc
runtime: Add LUA as trigger source
cassava May 11, 2023
2a93c49
engine(lua): Make sure there are no errors loading lua files
cassava May 11, 2023
6145d38
vendor: Add linenoise library
cassava May 24, 2023
4ba5acb
engine: Export vendor for Conan packaging
cassava Jun 22, 2023
b2f9bec
engine(lua): Add shell subcommand to start a Lua REPL
cassava May 11, 2023
95a773c
engine(lua): Add cloe.Duration type definition
cassava May 12, 2023
21720e6
engine(lua): Refactor entire codebase
cassava May 16, 2023
7640f3e
runtime(databroker): Add initial DataBroker implementation
clsim May 24, 2023
6c4104f
runtime(databroker): Rework implementation of Lua TypeAdapter
clsim Jun 24, 2023
5246824
runtime(lua): Provide Lua access to plugins (direct)
cassava Jun 29, 2023
17bd74e
runtime(databroker): Provide data broker access to plugins
cassava Jun 29, 2023
3cdeb5d
engine(lua): Fix Lua errors silently discarded
cassava Jul 5, 2023
88b2607
engine(lua): Implement cloe.alias_signals + cloe.require_signals + fi…
clsim Jul 5, 2023
1393f53
engine(lua): Ensure lua errors are caught
cassava Jul 5, 2023
329933c
runtime: Add CallbackResult return value to all action operator()
cassava Dec 5, 2023
06c2b73
engine(lua): Implement cloe.schedule_test API
cassava Jul 5, 2023
7bac73d
engine: Fix broken test_engine_nop_smoketest_dump
cassava Jul 10, 2023
976c726
engine: Speed up test_engine_curl_succeed smoketest
cassava Jul 10, 2023
19184b9
runtime!: Fix uninitialized use bug
cassava Jul 14, 2023
1c58255
engine!: Fix layout in conanfile.py
cassava Jul 17, 2023
663c63d
runtime(databroker): Implement minor changes to concept
clsim Jul 18, 2023
447a3db
runtime(databroker): Add default ctor
clsim Aug 2, 2023
e3ae86b
engine(lua): Use fable to_json for sol::object
cassava Aug 4, 2023
2a27d8a
engine(lua): Improve documentation in Lua API
cassava Aug 4, 2023
c4642cb
engine!: Apply clang-tidy suggestions
cassava Aug 4, 2023
e76f8ad
engine(lua): Apply stackfile changes from Lua tables
cassava Aug 4, 2023
f6b52fd
engine(lua): Improve cloe.fs API documentation and behavior
cassava Aug 4, 2023
d5ca5bb
engine: Apply clang-tidy suggestions
cassava Aug 4, 2023
e8ebb7e
engine(lua): Export test report at end of simulation
cassava Aug 4, 2023
9ba3ed8
runtime(databroker): Implement virtual properties for Lua binding
clsim Aug 9, 2023
f3236fb
engine(databroker): Adapt Simulation to latest Lua adapter
clsim Aug 9, 2023
5beb9cf
runtime(databroker): Make minor unit test changes
clsim Aug 11, 2023
97499c5
runtime: Reformat component.hpp
clsim Aug 24, 2023
c689406
models(lua): Add Lua binding for Wheel
clsim Aug 25, 2023
b7be566
models(lua): Add Lua binding for Object
clsim Aug 25, 2023
7bd7104
models(lua): Add Eigen vector-types to Lua
clsim Sep 8, 2023
d3b7aa6
runtime(databroker): Add type-declarator for Lua
clsim Aug 25, 2023
e2d12c0
runtime(databroker): Add test for enumerations in Lua
clsim Aug 28, 2023
0650480
ci: Enable Github workflows for important branches
cassava Sep 7, 2023
9984232
ci: Reduce number of jobs run for branches
cassava Sep 28, 2023
7b878a1
runtime(databroker): Add Lua test for physical quantities
clsim Sep 8, 2023
5254288
runtime(databroker): Add metadata to signals
clsim Sep 15, 2023
700ad9e
runtime(databroker): Refine metadata concept
clsim Sep 19, 2023
e8cc175
runtime(databroker): Add adapter for std::optional
clsim Sep 19, 2023
c740979
runtime(databroker): Add LuaAutoCompletionTag
clsim Sep 19, 2023
969b2a1
engine(databroker): Add signals.json to simulation result
clsim Sep 20, 2023
bac7d4f
engine(databroker): Add signals_autocompletion.lua to simulation result
clsim Sep 20, 2023
90f7057
engine(databroker): Add metadata-types
clsim Sep 26, 2023
8243d2c
runtime(databroker): Allow binding signals to a Lua table
cassava Oct 19, 2023
40e5814
runtime(databroker): Add SignalDescriptor
clsim Oct 20, 2023
a9f4c3d
runtime(databroker): Refine SignalDescriptor, add SignalTemplate
clsim Oct 25, 2023
299ac8e
runtime(databroker): Ensure const correctness
clsim Nov 17, 2023
089e081
models(lua): Add lua adapter code for CDM
clsim Sep 26, 2023
07b8856
models(lua): Expose ego_position
cassava Oct 9, 2023
10af8b4
engine(lua): Add LRDB Lua Debugger
clsim Sep 19, 2023
0f861e7
tests(lua): Add a test to simulate pause at start
cassava Sep 12, 2023
2871527
tests(lua): Add project configuration example and test in Lua
cassava Sep 18, 2023
bd4dac1
engine(lua): Add json library (CC-BY 3.0) and cloe.read_stackfile
cassava Sep 19, 2023
c43cf96
engine(lua): Add cloe.init_report and cloe.system
cassava Sep 20, 2023
6917fa0
engine(lua): Fix default values for schedule_these
cassava Sep 26, 2023
e410b70
engine(lua): Add cloe.api.exec function
cassava Sep 27, 2023
ac046e4
engine(lua): Move inspect.lua from cloe to lua directory
cassava Sep 28, 2023
a5b050e
engine(lua): Rewrite cloe.system and cloe_api_exec
cassava Sep 28, 2023
d4ac454
engine: Fix some unnecessary error messages from main
cassava Sep 28, 2023
e25cf04
engine(lua): Fix cloe.report.get_datetime
cassava Sep 28, 2023
02c3cc5
engine(lua): Improve REPL with multi-line editing and value printing
cassava Sep 29, 2023
0e804b1
engine: Fix some clang-tidy warnings
cassava Sep 29, 2023
db0c3c9
engine(lua): Add cloe.require function for relative requiring
cassava Oct 4, 2023
cb10623
engine: Collect errors and return them in results JSON
cassava Oct 4, 2023
7c6d445
engine: Make test_engine_nop_smoketest_dump.json work with editable p…
cassava Oct 4, 2023
b7ea13b
engine(lua): Fix tests that load project.lua
cassava Oct 4, 2023
d0dac8d
engine: Fix broken test_engine_nop_smoketest_dump
cassava Oct 9, 2023
5cb9f11
engine(lua): Fix test_lua_api_cloe_system broken with /bin/sh
cassava Oct 9, 2023
3f8cdab
docs: Add introduction to Lua
cassava Oct 9, 2023
a9750f0
docs: Document Lua initialization
cassava Oct 10, 2023
f336821
docs: Add documentation on Lua editor integration
cassava Dec 4, 2023
556d39e
engine(lua): Enable on field in schedule to be a function
cassava Oct 10, 2023
d355dbe
engine(lua): Add tests for new use-cases
cassava Oct 10, 2023
eb6047f
vendor(lua): Add github.com/gvvvaughan/typecheck library
cassava Oct 10, 2023
110ef8c
engine(lua): Fix failing test_lua10_heavy_cpu.lua
cassava Oct 11, 2023
22754c8
tests(lua): Fix duplicate test id
cassava Oct 12, 2023
fcc6d08
engine(lua): Add a function for getting git hash
CzBalti Oct 10, 2023
cb3b863
engine(lua): Add new sections to the testcase part of the report
CzBalti Oct 10, 2023
a992126
engine(lua): Extend the project specific report example
CzBalti Oct 10, 2023
532fd69
vendor(lua): Add https://github.com/bjornbytes/lust library
CzBalti Oct 12, 2023
3e11c79
engine(lua): Add lust based evaluation to cloe
CzBalti Oct 12, 2023
926c501
engine(lua): Allow the user to configure project.lua from a config file
CzBalti Oct 13, 2023
206526b
vendor(lua): Add github.com/leafo/tableshape library
cassava Oct 16, 2023
b7b2ab5
engine(lua): Restructure Lua integration
cassava Oct 19, 2023
905b578
engine(lua): Add cloe.alias_signals and rework cloe.require_signals_enum
cassava Oct 20, 2023
2cf728a
tooling: Update dependency sol2 to version 3.3.1
cassava Oct 23, 2023
b19641d
engine(lua): Auto-require cloe in cloe-engine shell
cassava Oct 23, 2023
ac2146d
engine: Replace boost::optional with std::optional
cassava Oct 26, 2023
383372f
runtime: Replace boost::filesystem with std::filesystem
cassava Nov 6, 2023
ddfcfc2
engine: Replace boost::filesystem with std::filesystem
cassava Nov 6, 2023
81b8499
engine(lua): Fix hinting and autocompletion for Lua LS
cassava Nov 6, 2023
e2b9283
engine(lua): Fix Lua 5.3 incompatibility
cassava Nov 6, 2023
8b7ffd9
engine(lua): Use _ENV instead of _G for Lust integration
cassava Nov 6, 2023
60876aa
engine(lua): Simplify test_lua_api_cloe_system.lua test
cassava Nov 6, 2023
87441e6
engine(lua): Make cloe.load_stackfile() return Stack
cassava Nov 6, 2023
714e125
engine(lua): Add cloe.set_signal() function
cassava Nov 6, 2023
2fc33c9
engine: Allow signals output file names to be configured
cassava Nov 7, 2023
cbab75b
engine(lua): Improve usage of types with Lua
cassava Nov 7, 2023
37dcc18
engine: Fix compile-time error in coordinator.cpp
cassava Nov 17, 2023
58d855f
engine(lua): Fix a few minor issues and add some Lua methods
cassava Nov 17, 2023
50a7832
engine(lua): Fix wait_until requiring timeout parameter
cassava Nov 30, 2023
f0e702f
tooling: Fix interspersed $() and ${} in Makefile.package
cassava Dec 4, 2023
46e6809
tooling: Make cloe a super-build of all packages
cassava Dec 4, 2023
3977167
tooling: Fix interspersed $() and ${} in Makefiles
cassava Dec 4, 2023
25c8196
cli: Show conan command being executed in verbose mode
cassava Apr 18, 2024
8c75171
refactor cloe to support multiple language frontends
Apr 24, 2024
e18e8d6
introduce Python API
Apr 24, 2024
389e062
basic plugin: add python bindings
Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
21 changes: 20 additions & 1 deletion .github/workflows/build-cloe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
---
name: Build Cloe

on:
push:
branches:
- master
- develop
- "release/**"
paths-ignore:
- "*.md"
- ".gitignore"
- "LICENSE"
- "dist/**"
- "docs/**"
- "ui/**"
pull_request:
paths-ignore:
- "*.md"
Expand All @@ -22,7 +35,13 @@ jobs:
- "cloe-normal"
package_target:
# 1. Build each test configuration in Conan cache and run all tests
- "export export-vendor smoketest-deps smoketest"
- "export-vendor export-all smoketest-deps smoketest"

# 2. Build cloe super-package in editable mode and run tests
- "export-vendor editable all smoketest TEST_CONANFILES=tests/conanfile_all.py"

# 3. Build individual packages in editable mode and run tests
- "export-vendor editable-select build-all smoketest TEST_CONANFILES=tests/conanfile_split.py"
env:
CONAN_NON_INTERACTIVE: "yes"
DEBIAN_FRONTEND: noninteractive
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
name: Build Documentation

on:
push:
branches:
- master
- develop
- "release/**"
paths:
- "docs/**"
- "*.hpp"
pull_request:
paths:
- "docs/**"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/build-ui.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
name: Build UI

on:
push:
branches:
- master
- develop
- "release/**"
paths:
- "ui/**"
pull_request:
paths:
- "ui/**"
Expand Down Expand Up @@ -29,8 +37,7 @@ jobs:
echo $version
if [[ $version == "v18"* ]]; then
npm run build_v18
else
else
npm run build
fi
shell: bash

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ setup.sh

# Standard out-of-source build
build/
deploy/

# Vendored Conan recipes sometimes extract fetched sources
vendor/**/src/
Expand All @@ -29,6 +30,7 @@ CMakeFiles/
compile_commands.json

# Files generated by Clang:
.cache/
.clangd/
.cache/

Expand Down
8 changes: 8 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"workspace.library": ["engine/lua"],
"runtime.version": "Lua 5.4",
"completion.displayContext": 1,
"diagnostics.globals": ["cloe"],
"hint.enable": true
}
36 changes: 36 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This CMakeLists.txt configures a super-build containing everything
# from this repo.
#
# It is currently experimental.
#

cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

project(cloe LANGUAGES CXX)

set(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/runtime/cmake")

# Since a super-build does not export packages individually via Conan,
# we cannot depend on Conan-generated CMake config files, instead we
# use the CMake targets directly as if they were already found.
set(CLOE_FIND_PACKAGES OFF CACHE BOOL "Call find_package() for cloe packages" FORCE)

# Ensure output goes to one place so cloe-launch can find the plugins
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)

# Ensure we can test from this level.
include(CTest)

add_subdirectory(fable)
add_subdirectory(runtime)
add_subdirectory(models)
add_subdirectory(oak)
add_subdirectory(osi)
add_subdirectory(stacklib)
add_subdirectory(simulation)
add_subdirectory(engine)
add_subdirectory(plugins)
if (${CLOE_PYTHON_API})
add_subdirectory(python)
endif()
133 changes: 82 additions & 51 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
# This file contains Makefile targets for the cloe project.
#

# Make configuration:
SHELL := /bin/bash
GNUMAKEFLAGS := --no-print-directory
SUBMAKEFLAGS :=

CLOE_ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
CLOE_LAUNCH := PYTHONPATH="${CLOE_ROOT}/cli" python3 -m cloe_launch
CLOE_LAUNCH := PYTHONPATH="$(CLOE_ROOT)/cli" python3 -m cloe_launch

include ${CLOE_ROOT}/Makefile.help
include $(CLOE_ROOT)/Makefile.help

# Set the clang-format command line to use:
CLANG_FORMAT := $(shell command -v clang-format 2>/dev/null)
Expand All @@ -20,78 +25,95 @@ AG := $(or \

# Build configuration:
BUILD_DIR := build
LOCKFILE_SOURCE := conanfile.py
BUILD_LOCKFILE := ${BUILD_DIR}/conan.lock
LOCKFILE_OPTION := --lockfile="${CLOE_ROOT}/${BUILD_LOCKFILE}"
INSTALL_DIR := /usr/local
CONAN_OPTIONS :=

# Lockfile for cloe-meta:
META_LOCKFILE_SOURCE := meta/conanfile.py
META_BUILD_LOCKFILE := meta/build/conan.lock
META_LOCKFILE_OPTION := --lockfile="$(CLOE_ROOT)/$(META_BUILD_LOCKFILE)"

.DEFAULT_GOAL := help
.PHONY: help
.SILENT: help
help::
$(call print_help_usage)
echo
$(call print_help_section, "Default target")
$(call print_help_target, help, "show this help on available targets")
echo

# Setup targets ---------------------------------------------------------------
include Makefile.setup

$(META_BUILD_LOCKFILE):
$(MAKE) -C meta LOCKFILE_SOURCE=conanfile.py lockfile

.PHONY: lockfile
lockfile: $(META_BUILD_LOCKFILE)

# Workspace targets -----------------------------------------------------------
help::
$(call print_help_section, "Available workspace targets")
$(call print_help_target, status, "show status of each of the Conan packages")
$(call print_help_target, smoketest-deps, "build system test pre-requisites")
$(call print_help_target, smoketest, "run system tests")
$(call print_help_target, docs, "generate documentation")
$(call print_help_target, deploy, "deploy Cloe to INSTALL_DIR [=${INSTALL_DIR}]")
$(call print_help_target, deploy-cli, "install ${_yel}cloe-launch${_rst} with ${_dim}${PIPX}${_rst}")
$(call print_help_target, export-cli, "export ${_yel}cloe-launch-profile${_rst} Conan recipe")
$(call print_help_target, docs, "generate Doxygen and Sphinx documentation")
echo

${BUILD_LOCKFILE}:
${MAKE} -f Makefile.package SOURCE_CONANFILE=/dev/null LOCKFILE_SOURCE=${LOCKFILE_SOURCE} ${BUILD_LOCKFILE}

.PHONY: lockfile
lockfile: ${BUILD_LOCKFILE}
.PHONY: docs
docs:
$(call print_header, "Generating Doxygen documentation...")
$(MAKE) -C docs doxygen
$(call print_header, "Generating Sphinx documentation...")
$(MAKE) -C docs html

.PHONY: status
status: ${BUILD_LOCKFILE}
@for pkg in ${ALL_PKGS}; do \
[ -d $${pkg} ] || continue; \
${MAKE} LOCKFILE_SOURCE="" LOCKFILE_OPTION=${LOCKFILE_OPTION} -C $${pkg} status || true; \
done
help::
$(call print_help_target, export-cli, "export $(_yel)cloe-launch-profile$(_rst) Conan recipe")
$(call print_help_target, deploy-cli, "install $(_yel)cloe-launch$(_rst) with $(_dim)$(PIPX)$(_rst)")
echo

.PHONY: deploy
deploy:
$(call print_header, "Deploying binaries to ${INSTALL_DIR}...")
conan install ${CONAN_OPTIONS} --install-folder ${BUILD_DIR}/deploy -g deploy .
mkdir -p ${INSTALL_DIR}
cp -r ${BUILD_DIR}/deploy/cloe-*/* ${INSTALL_DIR}/
.PHONY: export-cli
export-cli:
$(MAKE) -C cli export

.PHONY: deploy-cli
deploy-cli:
$(call print_header, "Deploying cloe-launch binary with pip...")
${MAKE} -C cli install
$(MAKE) -C cli install

.PHONY: export-cli
export-cli:
${MAKE} -C cli export
help::
$(call print_help_target, lockfile, "create a lockfile for cloe-meta package")
$(call print_help_target, status-all, "show status of each of the Conan packages")
$(call print_help_target, export-all, "export all package sources to Conan cache")
$(call print_help_target, build-all, "build individual packages locally in-source")
$(call print_help_target, deploy-all, "deploy $(_yel)cloe$(_rst) to $(_grn)INSTALL_DIR$(_rst)=$(_dim)$(INSTALL_DIR)$(_rst)")
$(call print_help_target, clean-all, "clean entire repository of temporary files")
$(call print_help_target, purge-all, "remove all cloe packages (in any version) from Conan cache")
echo

export: export-cli
package: export-cli
.PHONY: build-all
build-all: lockfile
$(MAKE) all-select UNSELECT_PKGS="meta" CONAN_OPTIONS="$(CONAN_OPTIONS) $(META_LOCKFILE_OPTION)"

.PHONY: docs
docs:
$(call print_header, "Generating Doxygen documentation...")
${MAKE} -C docs doxygen
$(call print_header, "Generating Sphinx documentation...")
${MAKE} -C docs html
.PHONY: status-all
status-all: $(META_BUILD_LOCKFILE)
@for pkg in $(ALL_PKGS); do \
$(MAKE) LOCKFILE_SOURCE="" LOCKFILE_OPTION=$(META_LOCKFILE_OPTION) -C $${pkg} status || true; \
done

.PHONY: smoketest-deps
smoketest-deps: export-cli smoketest-deps-select
.PHONY: export-all
export-all:
$(call print_header, "Exporting all cloe Conan packages...")
$(MAKE) export-select export-cli export

.PHONY: smoketest
smoketest: smoketest-select
.PHONY: deploy-all
deploy-all:
$(call print_header, "Deploying binaries to $(INSTALL_DIR)...")
conan install $(CONAN_OPTIONS) --install-folder $(BUILD_DIR)/deploy -g deploy .
mkdir -p $(INSTALL_DIR)
cp -r $(BUILD_DIR)/deploy/cloe-*/* $(INSTALL_DIR)/

.PHONY: clean-all
clean-all:
$(MAKE) clean clean-select

.PHONY: purge-all
purge-all:
Expand All @@ -114,17 +136,19 @@ format:
# continues to work as expected.
#
# See: https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame
find . -type f -not -path '*/\.git/*' -and \( -name '*.cpp' -o -name '*.hpp' \) -exec ${CLANG_FORMAT} ${CLANG_FORMAT_ARGS} -i {} \;
find . -type f -not -path '*/\.git/*' -and \( -name '*.cpp' -o -name '*.hpp' \) -exec $(CLANG_FORMAT) $(CLANG_FORMAT_ARGS) -i {} \;

.PHONY: todos
todos:
${AG} TODO
${AG} FIXME
${AG} XXX
$(AG) TODO
$(AG) FIXME
$(AG) XXX

# Hidden development targets --------------------------------------------------

.PHONY: grep-uuids
grep-uuids:
${AG} "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b"
$(AG) "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b"

.PHONY: find-missing-eol
find-missing-eol:
Expand All @@ -134,5 +158,12 @@ find-missing-eol:
sanitize-files:
git grep --cached -Ilz '' | while IFS= read -rd '' f; do tail -c1 < "$$f" | read -r _ || echo >> "$$f"; done

# Build targets ---------------------------------------------------------------
# Micro-packages build targets ------------------------------------------------
include Makefile.all

# Mono-package build targets --------------------------------------------------
DISABLE_HELP_PREAMBLE := true
help::
@printf "Available $(_yel)cloe$(_rst) package targets:\n"

include Makefile.package
Loading