-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gz-utils3' into merge_3_main_20241004
- Loading branch information
Showing
14 changed files
with
443 additions
and
99 deletions.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
common --enable_bzlmod | ||
common --lockfile_mode=off | ||
|
||
# Add C++17 compiler flags. | ||
build --cxxopt=-std=c++17 | ||
build --host_cxxopt=-std=c++17 | ||
|
||
build --force_pic | ||
build --strip=never | ||
build --strict_system_includes | ||
build --fission=dbg | ||
build --features=per_object_debug_info |
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 @@ | ||
7.3.1 |
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,24 @@ | ||
name: Bazel CI | ||
on: | ||
push: | ||
branches: [gz-utils3, main] | ||
pull_request: | ||
branches: [gz-utils3, main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6 | ||
with: | ||
folders: | | ||
[ | ||
".", | ||
] | ||
exclude: | | ||
[ | ||
{"bazelversion": "6.4.0"} | ||
{"bazelversion": "5.4.0"}, | ||
] |
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,15 @@ | ||
# This file contains Bazel settings to apply on CI only. | ||
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml | ||
|
||
# Debug where options came from | ||
build --announce_rc | ||
# This directory is configured in GitHub actions to be persisted between runs. | ||
# We do not enable the repository cache to cache downloaded external artifacts | ||
# as these are generally faster to download again than to fetch them from the | ||
# GitHub actions cache. | ||
build --disk_cache=~/.cache/bazel | ||
# Don't rely on test logs being easily accessible from the test runner, | ||
# though it makes the log noisier. | ||
test --test_output=errors | ||
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used | ||
test --test_env=XDG_CACHE_HOME |
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,12 @@ | ||
"gz-utils" | ||
|
||
module( | ||
name = "gz-utils", | ||
repo_name = "org_gazebosim_gz-utils", | ||
) | ||
|
||
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1") | ||
bazel_dep(name = "googletest", version = "1.14.0") | ||
bazel_dep(name = "rules_gazebo", version = "0.0.2") | ||
bazel_dep(name = "rules_license", version = "1.0.0") | ||
bazel_dep(name = "spdlog", version = "1.14.1") |
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 |
---|---|---|
@@ -1,36 +1,47 @@ | ||
load( | ||
"@gz//bazel/skylark:build_defs.bzl", | ||
"GZ_ROOT", | ||
"GZ_VISIBILITY", | ||
) | ||
load("@rules_license//rules:license.bzl", "license") | ||
|
||
package( | ||
default_applicable_licenses = [GZ_ROOT + "utils/cli:license"], | ||
default_applicable_licenses = ["//:license"], | ||
) | ||
|
||
license( | ||
name = "license", | ||
package_name = "gz-utils-cli", | ||
) | ||
|
||
public_headers = [ | ||
"include/gz/utils/cli/GzFormatter.hpp", | ||
] + glob([ | ||
"include/external-cli/gz/utils/cli/*.hpp", | ||
]) | ||
cc_library( | ||
name = "cli11", | ||
hdrs = glob([ | ||
"include/vendored-cli/gz/utils/cli/*.hpp", | ||
]), | ||
includes = ["include/vendored-cli"], | ||
) | ||
|
||
cc_library( | ||
name = "GzFormatter", | ||
hdrs = [ | ||
"include/gz/utils/cli/GzFormatter.hpp", | ||
], | ||
includes = ["include"], | ||
deps = [ | ||
"//:Export", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "cli", | ||
hdrs = public_headers, | ||
copts = ["-fexceptions"], | ||
includes = [ | ||
"include", | ||
"include/external-cli", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
":GzFormatter", | ||
":cli11", | ||
], | ||
visibility = GZ_VISIBILITY, | ||
) | ||
|
||
cc_test( | ||
name = "cli_TEST", | ||
srcs = ["src/cli_TEST.cc"], | ||
deps = [ | ||
GZ_ROOT + "utils:utils", | ||
"@cli11" | ||
":cli", | ||
"@googletest//:gtest_main", | ||
], | ||
) |
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
Oops, something went wrong.