Merge pull request #8176 from qzhuyan/dev/william/kill-quic

chore: don't build quic on MacOS
This commit is contained in:
William Yang 2022-06-13 14:34:39 +02:00 committed by GitHub
commit 5b79fd55a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 8 deletions

View File

@ -155,6 +155,7 @@ jobs:
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/bin" >> $GITHUB_PATH
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
echo "BUILD_WITH_QUIC=1" >> $GITHUB_ENV
- uses: actions/cache@v2
id: cache
with:

View File

@ -1,5 +1,4 @@
%% -*- mode: erlang -*-
IsCentos6 = fun() ->
case file:read_file("/etc/centos-release") of
{ok, <<"CentOS release 6", _/binary >>} ->
@ -13,10 +12,16 @@ IsWin32 = fun() ->
win32 =:= element(1, os:type())
end,
IsMacOS = fun() ->
{unix, darwin} =:= os:type()
end,
IsQuicSupp = fun() ->
not (IsCentos6() orelse IsWin32() orelse
not (IsCentos6() orelse IsWin32()
orelse IsMacOS() orelse
false =/= os:getenv("BUILD_WITHOUT_QUIC")
)
orelse "1" == os:getenv("BUILD_WITH_QUIC")
end,
Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}},

View File

@ -21,7 +21,7 @@
%% eredis_cluster's dependency getting resolved earlier.
%% Here we pin 1.5.2 to avoid surprises in the future.
{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, [

11
mix.exs
View File

@ -58,7 +58,7 @@ defmodule EMQXUmbrella.MixProject do
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
{:replayq, "0.3.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"},
{:observer_cli, "1.7.1"},
{:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"},
@ -594,8 +594,9 @@ defmodule EMQXUmbrella.MixProject do
not Enum.any?([
build_without_quic?(),
win32?(),
centos6?()
])
centos6?(),
macos?()
]) or "1" == System.get_env("BUILD_WITH_QUIC")
end
defp pkg_vsn() do
@ -623,6 +624,10 @@ defmodule EMQXUmbrella.MixProject do
end
end
defp macos?() do
{:unix, :darwin} == :os.type()
end
defp build_without_quic?() do
opt = System.get_env("BUILD_WITHOUT_QUIC", "false")

View File

@ -60,7 +60,7 @@
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}}
, {replayq, "0.3.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"}}}
, {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"}}}

View File

@ -79,7 +79,12 @@ is_enterprise(ee) -> true.
is_quicer_supported() ->
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() ->
%% reason: