diff --git a/testing/BUILD.bazel b/testing/BUILD.bazel index 52a77862..3206e5f5 100644 --- a/testing/BUILD.bazel +++ b/testing/BUILD.bazel @@ -22,6 +22,28 @@ sh_test( tags = ["haskell"], ) +sh_test( + name = "c_test", + size = "small", + srcs = ["//hs-tokstyle/tools:check-c"], + args = [ + "--cc=$(CC)", + "-Iexternal/libsodium/include", + "-Iexternal/libvpx", + "-Iexternal/opus/include", + "-Ihs-tokstyle/include", + ] + ["$(locations %s)" % f for f in CIMPLE_FILES], + data = CIMPLE_FILES + [ + "//c-toxcore/third_party:headers", + "//hs-tokstyle:headers", + "@libsodium//:headers", + "@libvpx//:headers", + "@opus//:headers", + ], + tags = ["haskell"], + toolchains = ["@rules_cc//cc:current_cc_toolchain"], +) + sh_test( name = "cimplefmt_test", size = "small", diff --git a/third_party/BUILD.bazel b/third_party/BUILD.bazel index 7a004d8a..45344cb2 100644 --- a/third_party/BUILD.bazel +++ b/third_party/BUILD.bazel @@ -7,3 +7,9 @@ cc_library( copts = ["-DCMP_NO_FLOAT"], visibility = ["//c-toxcore:__subpackages__"], ) + +filegroup( + name = "headers", + srcs = ["cmp/cmp.h"], + visibility = ["//c-toxcore:__subpackages__"], +)