From 89e2cdb5a48a4ac293b199701196371d8fe3c2cb Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 21 Feb 2022 11:55:19 +0100 Subject: [PATCH 1/3] docs: update windows.md to use otp 24 --- Windows.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows.md b/Windows.md index f02b40920..b30a65b81 100644 --- a/Windows.md +++ b/Windows.md @@ -29,7 +29,7 @@ The second path is for CMD to setup environment variables. ### Erlang/OTP -Install Erlang/OTP 23.2 from https://www.erlang.org/downloads +Install Erlang/OTP 24.2.1 from https://www.erlang.org/downloads You may need to edit the `Path` environment variable to allow running Erlang commands such as `erl` from CMD. @@ -45,7 +45,7 @@ e.g. ``` PS C:\Users\zmsto> erl -Eshell V11.1.4 (abort with ^G) +Eshell V12.2.1 (abort with ^G) 1> halt(). ``` From 3c22878d5499032c9cc56ef8e701b8c1f9e5cb79 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 21 Feb 2022 12:55:34 +0100 Subject: [PATCH 2/3] ci: update windows ci to use erlef action and add windows to slim build --- .github/workflows/build_packages.yaml | 25 ++++----------- .github/workflows/build_slim_packages.yaml | 37 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index 94bfccb22..190077a97 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -61,19 +61,16 @@ jobs: windows: runs-on: windows-2019 - needs: prepare if: endsWith(github.repository, 'emqx') - strategy: fail-fast: false matrix: profile: ${{fromJSON(needs.prepare.outputs.profiles)}} otp: - - 23.2 + - 24.2.1 exclude: - profile: emqx-edge - steps: - uses: actions/download-artifact@v2 with: @@ -82,9 +79,7 @@ jobs: - name: unzip source code run: Expand-Archive -Path source.zip -DestinationPath ./ - uses: ilammy/msvc-dev-cmd@v1 - - uses: gleam-lang/setup-erlang@v1.1.2 - id: install_erlang - ## gleam-lang/setup-erlang does not yet support the installation of otp24 on windows + - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp }} - name: build @@ -94,19 +89,7 @@ jobs: PROFILE: emqx working-directory: source run: | - $env:PATH = "${{ steps.install_erlang.outputs.erlpath }}\bin;$env:PATH" erl -eval "erlang:display(crypto:info_lib())" -s init stop - ## We do not build/release bcrypt for windows package - Remove-Item -Recurse -Force -Path _build/default/lib/bcrypt/ - if (Test-Path rebar.lock) { - Remove-Item -Force -Path rebar.lock - } - make ensure-rebar3 - copy rebar3 "${{ steps.install_erlang.outputs.erlpath }}\bin" - ls "${{ steps.install_erlang.outputs.erlpath }}\bin" - head -2 rebar3 - which rebar3 - rebar3 --help make ${{ matrix.profile }}-zip - name: run emqx timeout-minutes: 1 @@ -114,9 +97,13 @@ jobs: run: | ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start Start-Sleep -s 5 + echo "EMQX started" ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop + echo "EMQX stopped" ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install + echo "EQMX installed" ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall + echo "EQMX uninstaled" - uses: actions/upload-artifact@v1 if: startsWith(github.ref, 'refs/tags/') with: diff --git a/.github/workflows/build_slim_packages.yaml b/.github/workflows/build_slim_packages.yaml index 685dc3f94..d8482faf2 100644 --- a/.github/workflows/build_slim_packages.yaml +++ b/.github/workflows/build_slim_packages.yaml @@ -60,8 +60,43 @@ jobs: name: ${{ matrix.os }} path: _packages/**/*.zip - mac: + windows: + runs-on: windows-2019 + if: endsWith(github.repository, 'emqx') + strategy: + fail-fast: false + matrix: + profile: + - emqx + otp: + - 24.2.1 + steps: + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + - name: build + env: + PYTHON: python + DIAGNOSTIC: 1 + run: | + erl -eval "erlang:display(crypto:info_lib())" -s init stop + make ${{ matrix.profile }}-zip + - name: run emqx + timeout-minutes: 1 + run: | + ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start + Start-Sleep -s 5 + echo "EMQX started" + ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop + echo "EMQX stopped" + ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install + echo "EQMX installed" + ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall + echo "EQMX uninstaled" + mac: strategy: fail-fast: false matrix: From 99ef6fbb2aa48d8f05ce1a312fc377dde68fe9d0 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 21 Feb 2022 15:08:23 +0100 Subject: [PATCH 3/3] docs: update CHANGES-4.4 --- CHANGES-4.4.md | 6 ++++++ lib-ce/emqx_dashboard/src/emqx_dashboard.app.src | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES-4.4.md b/CHANGES-4.4.md index 29bdaf75f..c776c8e15 100644 --- a/CHANGES-4.4.md +++ b/CHANGES-4.4.md @@ -1,5 +1,11 @@ # EMQ X 4.4 Changes +## v4.4.2 + +### Minor changes + +* Windows package is built on Erlang/OTP 24 + ## v4.4.1 This patch release is only to fix windows build which failed on v4.4.0. diff --git a/lib-ce/emqx_dashboard/src/emqx_dashboard.app.src b/lib-ce/emqx_dashboard/src/emqx_dashboard.app.src index 7adcdc7db..0156ea865 100644 --- a/lib-ce/emqx_dashboard/src/emqx_dashboard.app.src +++ b/lib-ce/emqx_dashboard/src/emqx_dashboard.app.src @@ -1,6 +1,6 @@ {application, emqx_dashboard, [{description, "EMQ X Web Dashboard"}, - {vsn, "4.4.2"}, % strict semver, bump manually! + {vsn, "4.4.3"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_dashboard_sup]}, {applications, [kernel,stdlib,mnesia,minirest]},