ci: build dialyzer PLT with quicer, jq and bcrypt
This commit is contained in:
parent
9e9ae50ab9
commit
282d1a6829
|
@ -26,6 +26,19 @@ end,
|
||||||
Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}},
|
Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}},
|
||||||
Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.104"}}}.
|
Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.104"}}}.
|
||||||
|
|
||||||
|
Dialyzer = fun(Config) ->
|
||||||
|
{dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),
|
||||||
|
{plt_extra_apps, OldExtra} = lists:keyfind(plt_extra_apps, 1, OldDialyzerConfig),
|
||||||
|
Extra = OldExtra ++ [quicer || IsQuicSupp()],
|
||||||
|
NewDialyzerConfig = [{plt_extra_apps, Extra} | OldDialyzerConfig],
|
||||||
|
lists:keystore(
|
||||||
|
dialyzer,
|
||||||
|
1,
|
||||||
|
Config,
|
||||||
|
{dialyzer, NewDialyzerConfig}
|
||||||
|
)
|
||||||
|
end.
|
||||||
|
|
||||||
ExtraDeps = fun(C) ->
|
ExtraDeps = fun(C) ->
|
||||||
{deps, Deps0} = lists:keyfind(deps, 1, C),
|
{deps, Deps0} = lists:keyfind(deps, 1, C),
|
||||||
{erl_opts, ErlOpts0} = lists:keyfind(erl_opts, 1, C),
|
{erl_opts, ErlOpts0} = lists:keyfind(erl_opts, 1, C),
|
||||||
|
@ -43,4 +56,4 @@ ExtraDeps = fun(C) ->
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
ExtraDeps(CONFIG).
|
Dialyzer(ExtraDeps(CONFIG)).
|
||||||
|
|
|
@ -548,17 +548,20 @@ dialyzer(Config) ->
|
||||||
|
|
||||||
AppsToExclude = AppNames -- KnownApps,
|
AppsToExclude = AppNames -- KnownApps,
|
||||||
|
|
||||||
case length(AppsToAnalyse) > 0 of
|
Extra =
|
||||||
true ->
|
[bcrypt || provide_bcrypt_dep()] ++
|
||||||
|
[jq || is_jq_supported()] ++
|
||||||
|
[quicer || is_quicer_supported()],
|
||||||
|
NewDialyzerConfig =
|
||||||
|
OldDialyzerConfig ++
|
||||||
|
[{exclude_apps, AppsToExclude} || length(AppsToAnalyse) > 0] ++
|
||||||
|
[{plt_extra_apps, Extra} || length(Extra) > 0],
|
||||||
lists:keystore(
|
lists:keystore(
|
||||||
dialyzer,
|
dialyzer,
|
||||||
1,
|
1,
|
||||||
Config,
|
Config,
|
||||||
{dialyzer, OldDialyzerConfig ++ [{exclude_apps, AppsToExclude}]}
|
{dialyzer, NewDialyzerConfig}
|
||||||
);
|
).
|
||||||
false ->
|
|
||||||
Config
|
|
||||||
end.
|
|
||||||
|
|
||||||
coveralls() ->
|
coveralls() ->
|
||||||
case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of
|
case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of
|
||||||
|
|
Loading…
Reference in New Issue