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

Added Makefile with bazel wrappers [BUILD-360] #1289

Merged
merged 4 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build --action_env=BAZEL_CXXOPTS='-std=c++14'

build:clang-format-check --aspects @rules_swiftnav//clang_format:clang_format_check.bzl%clang_format_check_aspect
build:clang-format-check --@rules_swiftnav//clang_format:clang_format_config=//:clang_format_config
build:clang-format-check --output_groups=report

build:clang-tidy --aspects @rules_swiftnav//clang_tidy:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy --output_groups=report
5 changes: 5 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
filegroup(
name = "clang_format_config",
srcs = ["//:.clang-format"],
visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_swiftnav",
strip_prefix = "rules_swiftnav-b80ca392ea24a14f8d810380b14495680255903b",
url = "https://github.com/swift-nav/rules_swiftnav/archive/b80ca392ea24a14f8d810380b14495680255903b.tar.gz",
strip_prefix = "rules_swiftnav-e59de2d94814156ab50b467f562c8bb29beffc3c",
url = "https://github.com/swift-nav/rules_swiftnav/archive/e59de2d94814156ab50b467f562c8bb29beffc3c.tar.gz"
)

http_archive(
Expand Down
20 changes: 20 additions & 0 deletions c/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
do-all-unit-tests:
bazel test --test_tag_filters=unit --test_output=all //...

do-all-integration-tests:
bazel test --test_tag_filters=integration --test_output=all //...

clang-format-all-check:
bazel build //... --config=clang-format-check

clang-format-all:
bazel run @rules_swiftnav//clang_format

clang-tidy-all-check:
bazel build //... --config=clang-tidy

do-code-coverage:
bazel coverage --test_tag_filters=unit --collect_code_coverage --combined_report=lcov //...

do-generate-coverage-report: do-code-coverage
genhtml bazel-out/_coverage/_coverage_report.dat -o coverage