Skip to content

Commit

Permalink
Merge pull request #2186 from hzeller/feature-20240527-add-bant
Browse files Browse the repository at this point in the history
Integrate `bant` BUILD dependency cleaner into CI
  • Loading branch information
hzeller authored May 28, 2024
2 parents a750e48 + d6c5535 commit a939466
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,47 @@ jobs:
name: "diag"
path: "**/plot_*.svg"

RunBantBuildCleaneer:
# Running http://bant.build/ to check all dependencies in BUILD files.
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build Project genrules
run: |
# Fetch all dependency and run genrules for bant to see every file
# that makes it into the compile.
bazel fetch ...
bazel build \
//common/analysis:command-file-lexer \
//common/lsp:jcxxgen-testfile-gen \
//common/lsp:lsp-protocol-gen \
//common/util:version-header \
//verilog/CST:verilog-nonterminals-foreach-gen \
//verilog/parser:gen-verilog-token-enum \
//verilog/parser:verilog-lex \
//verilog/parser:verilog-parse-interface \
//verilog/parser:verilog-y \
//verilog/parser:verilog-y-final \
//verilog/tools/kythe:verilog-extractor-indexing-fact-type-foreach-gen
- name: Get Bant
run: |
# TODO: provide this as action where we simply say with version=...
VERSION="v0.1.3"
STATIC_VERSION="bant-${VERSION}-linux-static-x86_64"
wget "https://github.com/hzeller/bant/releases/download/${VERSION}/${STATIC_VERSION}.tar.gz"
tar xvzf "${STATIC_VERSION}.tar.gz"
mkdir -p bin
ln -sf ../"${STATIC_VERSION}/bin/bant" bin/
bin/bant -V
- name: Run bant build-cleaner
run: |
bin/bant dwyu ...
Check:
container: ubuntu:jammy
Expand Down
3 changes: 0 additions & 3 deletions common/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ cc_library(
"//common/util:algorithm",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)

Expand Down Expand Up @@ -266,7 +265,6 @@ cc_library(
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)

Expand Down Expand Up @@ -322,7 +320,6 @@ cc_library(
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)

Expand Down

0 comments on commit a939466

Please sign in to comment.