Check that the cli can compile with --warnings-as-errors in ci
It's technically a build target, so we didn't need to create a whole new test rule, but it's marked as "manual" so that it doesn't cause bazel build //... to fail (cherry picked from commitf2add661f4) (cherry picked from commit7e8c9590b9)
This commit is contained in:
parent
36ddf89ff8
commit
feebd983f6
|
|
@ -140,6 +140,11 @@ jobs:
|
||||||
cat << EOF >> user.bazelrc
|
cat << EOF >> user.bazelrc
|
||||||
build --strategy=TestRunner=local
|
build --strategy=TestRunner=local
|
||||||
EOF
|
EOF
|
||||||
|
- name: CLI COMPILE WARNINGS AS ERRORS
|
||||||
|
if: inputs.plugin == 'rabbitmq_cli'
|
||||||
|
run: |
|
||||||
|
bazel build //deps/rabbitmq_cli:compile_warnings_as_errors \
|
||||||
|
--verbose_failures
|
||||||
- name: COMPUTE TESTS IN SHARD
|
- name: COMPUTE TESTS IN SHARD
|
||||||
id: shard
|
id: shard
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -408,3 +408,34 @@ test_suite(
|
||||||
name = "rabbitmqctl_tests",
|
name = "rabbitmqctl_tests",
|
||||||
tests = ["tests"],
|
tests = ["tests"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
elixir_bytecode(
|
||||||
|
name = "compile_warnings_as_errors",
|
||||||
|
srcs = SRCS,
|
||||||
|
dest = "beam_files_werror",
|
||||||
|
elixirc_opts = [
|
||||||
|
"--warnings-as-errors",
|
||||||
|
"-e",
|
||||||
|
":application.ensure_all_started(:mix)",
|
||||||
|
],
|
||||||
|
env = {
|
||||||
|
"HOME": '"$(mktemp -d)"',
|
||||||
|
"MIX_ENV": "prod",
|
||||||
|
"DEPS_DIR": "$ERL_LIBS",
|
||||||
|
"ERL_COMPILER_OPTIONS": "deterministic",
|
||||||
|
"LANG": "en_US.UTF-8",
|
||||||
|
"LC_ALL": "en_US.UTF-8",
|
||||||
|
},
|
||||||
|
ez_deps = [
|
||||||
|
":csv.ez",
|
||||||
|
":json.ez",
|
||||||
|
],
|
||||||
|
setup = """\
|
||||||
|
mkdir -p _build/$MIX_ENV/lib/csv
|
||||||
|
cp -RL $ERL_LIBS/csv/ebin _build/$MIX_ENV/lib/csv
|
||||||
|
""",
|
||||||
|
deps = DEPS + [
|
||||||
|
"//deps/rabbit:erlang_app",
|
||||||
|
],
|
||||||
|
tags = ["manual"],
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue