Add a Bazel Buildifier CI job

This commit is contained in:
Robin Linden 2022-01-28 00:38:58 +01:00
parent b2ea0e5c76
commit 2cfa872818
No known key found for this signature in database
GPG Key ID: 601A604B7E605776
3 changed files with 24 additions and 5 deletions

View File

@ -153,3 +153,13 @@ jobs:
-lpthread $(pkg-config --cflags --libs libsodium opus vpx) -lpthread $(pkg-config --cflags --libs libsodium opus vpx)
- name: Run the test - name: Run the test
run: "./send_message_test | grep 'tox clients connected'" run: "./send_message_test | grep 'tox clients connected'"
buildifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check
run: |
wget --no-verbose --output-document=buildifier https://github.com/bazelbuild/buildtools/releases/download/4.2.5/buildifier-linux-amd64
sudo chmod +x buildifier
./buildifier --lint=warn --warnings=all -mode diff $(find . -type f -name BUILD.bazel)

View File

@ -16,9 +16,9 @@ cc_library(
deps = [ deps = [
":check_compat", ":check_compat",
"//c-toxcore/testing:misc_tools", "//c-toxcore/testing:misc_tools",
"//c-toxcore/toxcore",
"//c-toxcore/toxcore:Messenger", "//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:mono_time", "//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore",
], ],
) )
@ -40,8 +40,8 @@ flaky_tests = {
False, False,
), ),
deps = [ deps = [
":check_compat",
":auto_test_support", ":auto_test_support",
":check_compat",
"//c-toxcore/testing:misc_tools", "//c-toxcore/testing:misc_tools",
"//c-toxcore/toxav", "//c-toxcore/toxav",
"//c-toxcore/toxcore", "//c-toxcore/toxcore",

View File

@ -28,7 +28,10 @@ cc_binary(
cc_binary( cc_binary(
name = "create_minimal_savedata", name = "create_minimal_savedata",
testonly = 1, testonly = 1,
srcs = ["create_minimal_savedata.c", "create_common.h"], srcs = [
"create_common.h",
"create_minimal_savedata.c",
],
deps = [ deps = [
"//c-toxcore/toxcore:ccompat", "//c-toxcore/toxcore:ccompat",
"@libsodium", "@libsodium",
@ -38,7 +41,10 @@ cc_binary(
cc_binary( cc_binary(
name = "create_savedata", name = "create_savedata",
testonly = 1, testonly = 1,
srcs = ["create_savedata.c", "create_common.h"], srcs = [
"create_common.h",
"create_savedata.c",
],
deps = [ deps = [
"//c-toxcore/toxcore", "//c-toxcore/toxcore",
"//c-toxcore/toxcore:ccompat", "//c-toxcore/toxcore:ccompat",
@ -49,7 +55,10 @@ cc_binary(
cc_binary( cc_binary(
name = "create_bootstrap_keys", name = "create_bootstrap_keys",
testonly = 1, testonly = 1,
srcs = ["create_bootstrap_keys.c", "create_common.h"], srcs = [
"create_bootstrap_keys.c",
"create_common.h",
],
deps = [ deps = [
"//c-toxcore/toxcore:ccompat", "//c-toxcore/toxcore:ccompat",
"@libsodium", "@libsodium",