Merge pull request #8176 from qzhuyan/dev/william/kill-quic
chore: don't build quic on MacOS
This commit is contained in:
commit
5b79fd55a2
|
@ -155,6 +155,7 @@ jobs:
|
||||||
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
|
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
|
||||||
echo "/usr/local/bin" >> $GITHUB_PATH
|
echo "/usr/local/bin" >> $GITHUB_PATH
|
||||||
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
|
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
|
||||||
|
echo "BUILD_WITH_QUIC=1" >> $GITHUB_ENV
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
|
|
||||||
IsCentos6 = fun() ->
|
IsCentos6 = fun() ->
|
||||||
case file:read_file("/etc/centos-release") of
|
case file:read_file("/etc/centos-release") of
|
||||||
{ok, <<"CentOS release 6", _/binary >>} ->
|
{ok, <<"CentOS release 6", _/binary >>} ->
|
||||||
|
@ -13,10 +12,16 @@ IsWin32 = fun() ->
|
||||||
win32 =:= element(1, os:type())
|
win32 =:= element(1, os:type())
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
IsMacOS = fun() ->
|
||||||
|
{unix, darwin} =:= os:type()
|
||||||
|
end,
|
||||||
|
|
||||||
IsQuicSupp = fun() ->
|
IsQuicSupp = fun() ->
|
||||||
not (IsCentos6() orelse IsWin32() orelse
|
not (IsCentos6() orelse IsWin32()
|
||||||
|
orelse IsMacOS() orelse
|
||||||
false =/= os:getenv("BUILD_WITHOUT_QUIC")
|
false =/= os:getenv("BUILD_WITHOUT_QUIC")
|
||||||
)
|
)
|
||||||
|
orelse "1" == os:getenv("BUILD_WITH_QUIC")
|
||||||
end,
|
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"}}},
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
%% eredis_cluster's dependency getting resolved earlier.
|
%% eredis_cluster's dependency getting resolved earlier.
|
||||||
%% Here we pin 1.5.2 to avoid surprises in the future.
|
%% Here we pin 1.5.2 to avoid surprises in the future.
|
||||||
{poolboy, {git, "https://github.com/emqx/poolboy.git", {tag, "1.5.2"}}},
|
{poolboy, {git, "https://github.com/emqx/poolboy.git", {tag, "1.5.2"}}},
|
||||||
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.5.0"}}}
|
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.5.1"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{shell, [
|
{shell, [
|
||||||
|
|
11
mix.exs
11
mix.exs
|
@ -58,7 +58,7 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
|
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
|
||||||
{:replayq, "0.3.4", override: true},
|
{:replayq, "0.3.4", override: true},
|
||||||
{:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true},
|
{:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true},
|
||||||
{:emqtt, github: "emqx/emqtt", tag: "1.5.0", override: true},
|
{:emqtt, github: "emqx/emqtt", tag: "1.5.1", override: true},
|
||||||
{:rulesql, github: "emqx/rulesql", tag: "0.1.4"},
|
{:rulesql, github: "emqx/rulesql", tag: "0.1.4"},
|
||||||
{:observer_cli, "1.7.1"},
|
{:observer_cli, "1.7.1"},
|
||||||
{:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"},
|
{:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"},
|
||||||
|
@ -594,8 +594,9 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
not Enum.any?([
|
not Enum.any?([
|
||||||
build_without_quic?(),
|
build_without_quic?(),
|
||||||
win32?(),
|
win32?(),
|
||||||
centos6?()
|
centos6?(),
|
||||||
])
|
macos?()
|
||||||
|
]) or "1" == System.get_env("BUILD_WITH_QUIC")
|
||||||
end
|
end
|
||||||
|
|
||||||
defp pkg_vsn() do
|
defp pkg_vsn() do
|
||||||
|
@ -623,6 +624,10 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp macos?() do
|
||||||
|
{:unix, :darwin} == :os.type()
|
||||||
|
end
|
||||||
|
|
||||||
defp build_without_quic?() do
|
defp build_without_quic?() do
|
||||||
opt = System.get_env("BUILD_WITHOUT_QUIC", "false")
|
opt = System.get_env("BUILD_WITHOUT_QUIC", "false")
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
|
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
|
||||||
, {replayq, "0.3.4"}
|
, {replayq, "0.3.4"}
|
||||||
, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}
|
, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}
|
||||||
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.5.0"}}}
|
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.5.1"}}}
|
||||||
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.4"}}}
|
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.4"}}}
|
||||||
, {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x
|
, {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x
|
||||||
, {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}}
|
, {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}}
|
||||||
|
|
|
@ -79,7 +79,12 @@ is_enterprise(ee) -> true.
|
||||||
|
|
||||||
is_quicer_supported() ->
|
is_quicer_supported() ->
|
||||||
not (false =/= os:getenv("BUILD_WITHOUT_QUIC") orelse
|
not (false =/= os:getenv("BUILD_WITHOUT_QUIC") orelse
|
||||||
is_win32() orelse is_centos_6()).
|
is_macos() orelse
|
||||||
|
is_win32() orelse is_centos_6()) orelse
|
||||||
|
"1" == os:getenv("BUILD_WITH_QUIC").
|
||||||
|
|
||||||
|
is_macos() ->
|
||||||
|
{unix, darwin} =:= os:type().
|
||||||
|
|
||||||
is_centos_6() ->
|
is_centos_6() ->
|
||||||
%% reason:
|
%% reason:
|
||||||
|
|
Loading…
Reference in New Issue