80
80
source ./.github/settings.sh
81
81
./.github/bin/install-bazel.sh
82
82
83
+ - name : Get Bant
84
+ run : |
85
+ # TODO: provide this as action where we simply say with version=...
86
+ VERSION="v0.1.9"
87
+ STATIC_VERSION="bant-${VERSION}-linux-static-x86_64"
88
+ wget "https://github.com/hzeller/bant/releases/download/${VERSION}/${STATIC_VERSION}.tar.gz"
89
+ tar xvzf "${STATIC_VERSION}.tar.gz"
90
+ mkdir -p bin
91
+ ln -sf ../"${STATIC_VERSION}/bin/bant" bin/
92
+ bin/bant -V
93
+
83
94
- name : Create Cache Timestamp
84
95
id : cache_timestamp
85
96
uses : nanzm/get-time-action@v2.0
@@ -92,14 +103,28 @@ jobs:
92
103
path : |
93
104
/root/.cache/clang-tidy
94
105
/root/.cache/bazel
95
- key : clang-tidy-${{ steps.cache_timestamp.outputs.time }}
96
- restore-keys : clang-tidy-
106
+ key : clang-tidy-bant-${{ steps.cache_timestamp.outputs.time }}
107
+ restore-keys : clang-tidy-bant
108
+
109
+ - name : Build Project genrules
110
+ run : |
111
+ # Fetch all dependencies and run genrules for bant to see every file
112
+ # that makes it into the compile to build comile DB.f
113
+ bazel fetch ...
114
+ bazel build \
115
+ //verible/common/analysis:command-file-lexer \
116
+ //verible/verilog/parser:verilog-lex \
117
+ //verible/verilog/parser:verilog-y \
118
+ //verible/verilog/parser:verilog-y-final \
119
+ //verible/common/analysis:command-file-lexer_test
120
+ bazel build $(bin/bant -q genrule-outputs | awk '{print $2}') \
121
+ $(bin/bant list-targets | grep cc_proto_library | awk '{print $3}')
97
122
98
123
- name : Run clang tidy
99
124
run : |
100
125
echo "::group::Make Compilation DB"
101
- .github/bin/make-compilation-db.sh
102
- wc -l compile_commands.json
126
+ BANT=bin/bant .github/bin/make-compilation-db.sh
127
+ cat compile_flags.txt
103
128
echo "::endgroup::"
104
129
# For runtime references, use clang-tidy 11 that still has it, everything else: latest.
105
130
CLANG_TIDY=clang-tidy-11 ./.github/bin/run-clang-tidy-cached.cc --checks="-*,google-runtime-references" \
@@ -127,7 +152,7 @@ jobs:
127
152
- name : Get Bant
128
153
run : |
129
154
# TODO: provide this as action where we simply say with version=...
130
- VERSION="v0.1.7 "
155
+ VERSION="v0.1.9 "
131
156
STATIC_VERSION="bant-${VERSION}-linux-static-x86_64"
132
157
wget "https://github.com/hzeller/bant/releases/download/${VERSION}/${STATIC_VERSION}.tar.gz"
133
158
tar xvzf "${STATIC_VERSION}.tar.gz"
@@ -348,45 +373,6 @@ jobs:
348
373
with :
349
374
path : kythe_output/*.kzip
350
375
351
- MacOsBuildDevTools :
352
- runs-on : macos-latest
353
- steps :
354
-
355
- - name : Install Dependencies
356
- run : |
357
- brew install llvm
358
- echo "CLANG_TIDY=$(brew --prefix llvm)/bin/clang-tidy" >> $GITHUB_ENV
359
- echo "USE_BAZEL_VERSION=6.5.0" >> $GITHUB_ENV
360
-
361
- - name : Checkout code
362
- uses : actions/checkout@v3
363
- with :
364
- fetch-depth : 0
365
-
366
- - name : Create Cache Timestamp
367
- id : cache_timestamp
368
- uses : nanzm/get-time-action@v2.0
369
- with :
370
- format : ' YYYY-MM-DD-HH-mm-ss'
371
-
372
- - name : Mount bazel cache
373
- uses : actions/cache@v3
374
- with :
375
- path : |
376
- /private/var/tmp/_bazel_runner
377
- /Users/runner/.cache/clang-tidy
378
- key : clangtidy_macos_${{ steps.cache_timestamp.outputs.time }}
379
- restore-keys : clangtidy_macos_
380
-
381
- - name : Test Developer tooling scripts
382
- run : |
383
- # Just a smoke test to make sure developer scripts run on Mac
384
- echo "::group::Make Compilation DB"
385
- .github/bin/make-compilation-db.sh
386
- echo "::endgroup::"
387
- # Quick with no checks to be fast (full tidy run in ClangTidy action)
388
- .github/bin/run-clang-tidy-cached.cc --checks="-*"
389
-
390
376
MacOsBuild :
391
377
runs-on : macos-latest
392
378
steps :
0 commit comments