From 808e265bff3a1482f8344f386b67ee752988e09c Mon Sep 17 00:00:00 2001 From: Mikael Persson Date: Fri, 6 Oct 2023 09:53:58 -0400 Subject: [PATCH 1/2] Rewired to public git repos, removed submodules --- .gitmodules | 6 ------ WORKSPACE | 27 ++++++++++++++++++++------- diff_drive/BUILD | 36 ++++++++++++++++++------------------ third_party/eigenmath | 1 - third_party/genit | 1 - 5 files changed, 38 insertions(+), 33 deletions(-) delete mode 160000 third_party/eigenmath delete mode 160000 third_party/genit diff --git a/.gitmodules b/.gitmodules index e45646b..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "third_party/genit"] - path = third_party/genit - url = https://github.com/theteamatx/x-edr-genit.git -[submodule "third_party/eigenmath"] - path = third_party/eigenmath - url = https://github.com/theteamatx/x-edr-eigenmath.git diff --git a/WORKSPACE b/WORKSPACE index 6bad20b..3c68a7c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,4 +1,5 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "bazel_skylib", @@ -48,17 +49,29 @@ protobuf_deps() http_archive( name = "eigen", build_file = "//third_party:eigen.BUILD", + sha256 = "8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72", url = "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz", strip_prefix="eigen-3.4.0", ) -local_repository( - name = "genit", - path = "third_party/genit", +# GenIt +_GENIT_VERSION = "1.0.0" +http_archive( + name = "x_edr_genit", + sha256 = "ab1bbb15ecbe86c5c3888a12c56fe88fac416f2f305acaf1bbf7f68c3d429851", + strip_prefix = "x-edr-genit-%s" % _GENIT_VERSION, + urls = [ + "https://github.com/theteamatx/x-edr-genit/archive/refs/tags/v%s.tar.gz" % _GENIT_VERSION, + ], ) -local_repository( - name = "eigenmath", - path = "third_party/eigenmath", +# Eigenmath +# TODO Replace with http_archive when eigenmath has a release available. +git_repository( + name = "x_edr_eigenmath", + repo_mapping = { + "@genit": "@x_edr_genit", + }, + remote = "https://github.com/theteamatx/x-edr-eigenmath.git", + branch = "main" ) - diff --git a/diff_drive/BUILD b/diff_drive/BUILD index 99852a9..d6883fa 100644 --- a/diff_drive/BUILD +++ b/diff_drive/BUILD @@ -66,11 +66,11 @@ cc_library( ], deps = [ ":interval", - "@eigenmath//eigenmath", - "@genit//genit:iterators", "@com_google_absl//absl/log:check", "@com_google_absl//absl/log", "@com_google_absl//absl/strings:str_format", + "@x_edr_eigenmath//eigenmath", + "@x_edr_genit//genit:iterators", ], ) @@ -89,8 +89,8 @@ cc_library( deps = [ ":base_feedback_control_config_cc_proto", ":differential_drive", - "@eigenmath//eigenmath", "@com_google_absl//absl/types:span", + "@x_edr_eigenmath//eigenmath", ], ) @@ -100,7 +100,7 @@ proto_library( "diff_drive.proto", ], deps = [ - "@eigenmath//eigenmath:eigenmath_proto", + "@x_edr_eigenmath//eigenmath:eigenmath_proto", ], ) @@ -120,11 +120,11 @@ cc_library( deps = [ ":diff_drive_cc_proto", ":differential_drive", - "@eigenmath//eigenmath:eigenmath_cc_proto", - "@eigenmath//eigenmath:conversions", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@x_edr_eigenmath//eigenmath:eigenmath_cc_proto", + "@x_edr_eigenmath//eigenmath:conversions", ], ) @@ -137,9 +137,9 @@ cc_test( ":diff_drive_cc_proto", ":diff_drive_conversion", ":differential_drive", - "@eigenmath//eigenmath:eigenmath_cc_proto", "@com_google_protobuf//:protobuf", "@com_google_googletest//:gtest_main", + "@x_edr_eigenmath//eigenmath:eigenmath_cc_proto", ], ) @@ -186,8 +186,8 @@ cc_library( ], deps = [ ":differential_drive", - "@eigenmath//eigenmath:matchers", "@com_google_googletest//:gtest", + "@x_edr_eigenmath//eigenmath:matchers", ], ) @@ -233,10 +233,10 @@ cc_test( ":differential_drive", ":matchers", ":test_fixtures", - "@eigenmath//eigenmath:matchers", - "@eigenmath//eigenmath:sampling", "@com_google_googletest//:gtest_main", "@com_google_absl//absl/flags:flag", + "@x_edr_eigenmath//eigenmath:matchers", + "@x_edr_eigenmath//eigenmath:sampling", ], ) @@ -282,8 +282,8 @@ cc_test( deps = [ ":differential_drive", ":test_fixtures", - "@eigenmath//eigenmath:matchers", "@com_google_googletest//:gtest_main", + "@x_edr_eigenmath//eigenmath:matchers", ], ) @@ -294,14 +294,14 @@ cc_test( ], deps = [ ":differential_drive", - "@eigenmath//eigenmath", - "@eigenmath//eigenmath:matchers", - "@eigenmath//eigenmath:sampling", - "@genit//genit:iterators", "@com_google_benchmark//:benchmark", "@com_google_googletest//:gtest_main", "@com_google_absl//absl/random:distributions", "@com_google_absl//absl/strings:str_format", + "@x_edr_eigenmath//eigenmath", + "@x_edr_eigenmath//eigenmath:matchers", + "@x_edr_eigenmath//eigenmath:sampling", + "@x_edr_genit//genit:iterators", ], ) @@ -336,8 +336,8 @@ cc_test( ], deps = [ ":motion_control", - "@eigenmath//eigenmath:matchers", "@com_google_googletest//:gtest_main", + "@x_edr_eigenmath//eigenmath:matchers", ], ) @@ -349,8 +349,8 @@ cc_test( deps = [ ":differential_drive", ":motion_control", - "@eigenmath//eigenmath:matchers", "@com_google_googletest//:gtest_main", + "@x_edr_eigenmath//eigenmath:matchers", ], ) @@ -362,7 +362,7 @@ cc_test( deps = [ ":differential_drive", ":motion_control", - "@eigenmath//eigenmath:matchers", "@com_google_googletest//:gtest_main", + "@x_edr_eigenmath//eigenmath:matchers", ], ) diff --git a/third_party/eigenmath b/third_party/eigenmath deleted file mode 160000 index 7080426..0000000 --- a/third_party/eigenmath +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 70804261a46fdb1dc8a8cc87974d7c2f05acbb75 diff --git a/third_party/genit b/third_party/genit deleted file mode 160000 index 542a055..0000000 --- a/third_party/genit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 542a05502bf8b0e94c7b756aead336dbcf2c7471 From aed7fb21119c7e3e0d8d2e87bae84a6ee4cd2259 Mon Sep 17 00:00:00 2001 From: Mikael Persson Date: Mon, 9 Oct 2023 10:34:32 -0400 Subject: [PATCH 2/2] Moved eigenmath dep to release version, removed submodule checkout in codeql --- .github/workflows/codeql.yml | 3 --- WORKSPACE | 15 +++++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7beff43..9936a37 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,9 +27,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - with: - token: ${{secrets.X_EDR_REPO_PAK}} - submodules: 'true' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/WORKSPACE b/WORKSPACE index 3c68a7c..b000b4c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,5 +1,4 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "bazel_skylib", @@ -66,12 +65,12 @@ http_archive( ) # Eigenmath -# TODO Replace with http_archive when eigenmath has a release available. -git_repository( +_EIGENMATH_VERSION = "1.0.0" +http_archive( name = "x_edr_eigenmath", - repo_mapping = { - "@genit": "@x_edr_genit", - }, - remote = "https://github.com/theteamatx/x-edr-eigenmath.git", - branch = "main" + sha256 = "180bf186214b37190e3f26204a271d214b503b25bd22d4228d8f32e7c7151e05", + strip_prefix = "x-edr-eigenmath-%s" % _EIGENMATH_VERSION, + urls = [ + "https://github.com/theteamatx/x-edr-eigenmath/archive/refs/tags/v%s.tar.gz" % _EIGENMATH_VERSION, + ], )