File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ # On Windows, make's path resolution algorithm is incorrect. It picks up a bazel.exe in PATH that's
2
+ # after a bazel binary. In particular, on actions, the non-exe binary is a bazelisk instance, whereas
3
+ # bazel.exe is a bazel installation.
4
+ # This means we pick up the wrong bazel version, and if the differences between the bazel we want
5
+ # and that we actually get are too big, the build fails on CI.
6
+ BAZEL := $(shell bash -c "which bazel")
7
+
1
8
all : gen extractor
2
9
3
10
EXTRACTOR_PACK_OUT = extractor-pack
@@ -28,10 +35,10 @@ qhelp-to-markdown:
28
35
scripts/qhelp-to-markdown.sh ql/src " $( QHELP_OUT_DIR) "
29
36
30
37
extractor :
31
- bazel run :go-installer
38
+ $( BAZEL ) run :go-installer
32
39
33
40
gen :
34
- bazel run :gen
41
+ $( BAZEL ) run :gen
35
42
36
43
build/stats/src.stamp :
37
44
mkdir -p $(@D ) /src
@@ -48,7 +55,7 @@ test: all build/testdb/check-upgrade-path
48
55
codeql test run -j0 ql/test --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache )
49
56
# use GOOS=linux because GOOS=darwin GOARCH=386 is no longer supported
50
57
env GOOS=linux GOARCH=386 codeql$(EXE) test run -j0 ql/test/query-tests/Security/CWE-681 --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache)
51
- cd extractor; bazel test ...
58
+ cd extractor; $(BAZEL) test ...
52
59
bash extractor-smoke-test/test.sh || (echo "Extractor smoke test FAILED"; exit 1)
53
60
54
61
.PHONY : build/testdb/check-upgrade-path
You can’t perform that action at this time.
0 commit comments