From fa41c9ff3599a4468528e7c8bf02f08d682515e9 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 16 Jun 2022 12:17:02 +0200 Subject: [PATCH 1/3] chore: pin quicer 0.0.12 quicer (quic.git) 0.0.12 has a build cache enabled which can spped up the builds --- apps/emqx/rebar.config.script | 2 +- mix.exs | 2 +- rebar.config.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/emqx/rebar.config.script b/apps/emqx/rebar.config.script index 136e79190..c7635a682 100644 --- a/apps/emqx/rebar.config.script +++ b/apps/emqx/rebar.config.script @@ -24,7 +24,7 @@ IsQuicSupp = fun() -> end, 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.11"}}}. +Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.12"}}}. ExtraDeps = fun(C) -> {deps, Deps0} = lists:keyfind(deps, 1, C), diff --git a/mix.exs b/mix.exs index f29ad1a5b..a681f7d29 100644 --- a/mix.exs +++ b/mix.exs @@ -591,7 +591,7 @@ defmodule EMQXUmbrella.MixProject do defp quicer_dep() do if enable_quicer?(), # in conflict with emqx and emqtt - do: [{:quicer, github: "emqx/quic", tag: "0.0.11", override: true}], + do: [{:quicer, github: "emqx/quic", tag: "0.0.12", override: true}], else: [] end diff --git a/rebar.config.erl b/rebar.config.erl index a53533559..e3c579664 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -38,7 +38,7 @@ 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.11"}}}. + {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.12"}}}. jq() -> {jq, {git, "https://github.com/emqx/jq", {tag, "v0.3.4"}}}. From 50b4d95b0223892437573fbfe086929c92841ead Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 16 Jun 2022 12:20:37 +0200 Subject: [PATCH 2/3] build: ensure download quic pre-built package for EMQX build --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 12666d500..d2ae0221f 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh) export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh) export EMQX_DASHBOARD_VERSION ?= v0.36.0 export EMQX_REL_FORM ?= tgz +export QUICER_DOWNLOAD_FROM_RELEASE = 1 ifeq ($(OS),Windows_NT) export REBAR_COLOR=none FIND=/usr/bin/find From b3182609c3a215ad98899f0c9a6c8f5010bdbecc Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 16 Jun 2022 13:07:27 +0200 Subject: [PATCH 3/3] ci: delete dpes cache from github work-flows --- .github/workflows/build_slim_packages.yaml | 28 ---------------------- .github/workflows/run_emqx_app_tests.yaml | 10 -------- .github/workflows/run_fvt_tests.yaml | 27 --------------------- .github/workflows/run_relup_tests.yaml | 12 ---------- scripts/get-dep-refs.sh | 10 -------- 5 files changed, 87 deletions(-) delete mode 100755 scripts/get-dep-refs.sh diff --git a/.github/workflows/build_slim_packages.yaml b/.github/workflows/build_slim_packages.yaml index 2f94a1c01..6f3ae2bf7 100644 --- a/.github/workflows/build_slim_packages.yaml +++ b/.github/workflows/build_slim_packages.yaml @@ -50,19 +50,6 @@ jobs: run: | echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV echo "CODE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV - - name: Get deps git refs for cache - id: deps-refs - run: | - git config --global --add safe.directory "/__w/emqx/emqx" - scripts/get-dep-refs.sh - make clean-all - - name: load quicer cache - uses: actions/cache@v2 - with: - path: | - _build/default/lib/quicer/ - deps/quicer/ - key: ${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - name: Work around https://github.com/actions/checkout/issues/766 run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" @@ -171,21 +158,6 @@ jobs: kerl update releases kerl build ${{ matrix.otp }} kerl install ${{ matrix.otp }} $HOME/.kerl/${{ matrix.otp }} - - name: Get deps git refs for cache - id: deps-refs - env: - AUTO_INSTALL_BUILD_DEPS: 1 - run: | - . $HOME/.kerl/${{ matrix.otp }}/activate - make ensure-rebar3 - sudo cp rebar3 /usr/local/bin/rebar3 - scripts/get-dep-refs.sh - make clean-all - - name: load quicer cache - uses: actions/cache@v2 - with: - path: _build/default/lib/quicer/ - key: ${{ matrix.macos }}-${{ matrix.otp }}-macos-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - name: build ${{ matrix.profile }} env: AUTO_INSTALL_BUILD_DEPS: 1 diff --git a/.github/workflows/run_emqx_app_tests.yaml b/.github/workflows/run_emqx_app_tests.yaml index 6ff5894cc..7539d6d8b 100644 --- a/.github/workflows/run_emqx_app_tests.yaml +++ b/.github/workflows/run_emqx_app_tests.yaml @@ -34,16 +34,6 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Get deps git refs for cache - id: deps-refs - run: | - PATH=$PATH:./ scripts/get-dep-refs.sh - make clean-all - - name: load quicer cache - uses: actions/cache@v2 - with: - path: _build/default/lib/quicer/ - key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - name: run run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index d5fbc32b6..94eeb10b0 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -65,21 +65,6 @@ jobs: - name: unzip source code run: unzip -q source.zip - - name: Get deps git refs for cache - id: deps-refs - run: | - cd source - make ensure-rebar3 - sudo cp rebar3 /usr/local/bin/rebar3 - scripts/get-dep-refs.sh - - name: load quicer cache - uses: actions/cache@v2 - with: - path: | - source/_build/default/lib/quicer/ - source/deps/quicer/ - key: ${{ matrix.os[0] }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - - name: make docker image working-directory: source env: @@ -148,18 +133,6 @@ jobs: path: . - name: unzip source code run: unzip -q source.zip - - name: Get deps git refs for cache - id: deps-refs - run: | - cd source - make ensure-rebar3 - sudo cp rebar3 /usr/local/bin/rebar3 - scripts/get-dep-refs.sh - - name: load quicer cache - uses: actions/cache@v2 - with: - path: source/_build/default/lib/quicer/ - key: ${{ matrix.os[0] }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - name: make docker image working-directory: source diff --git a/.github/workflows/run_relup_tests.yaml b/.github/workflows/run_relup_tests.yaml index bcd72a729..b14e6a7ce 100644 --- a/.github/workflows/run_relup_tests.yaml +++ b/.github/workflows/run_relup_tests.yaml @@ -72,18 +72,6 @@ jobs: - name: Get old vsn run: echo "OLD_VSNS=$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)" >> $GITHUB_ENV - - name: Get deps git refs for cache - id: deps-refs - run: | - cd emqx - scripts/get-dep-refs.sh - - - name: load quicer cache - uses: actions/cache@v2 - with: - path: emqx/_build/default/lib/quicer/ - key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} - - name: build emqx env: PROFILE: ${{ matrix.profile }} diff --git a/scripts/get-dep-refs.sh b/scripts/get-dep-refs.sh deleted file mode 100755 index 4a32aa069..000000000 --- a/scripts/get-dep-refs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -get_ref() { - local APP=$1 - #echo "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()." - erl -noshell -eval "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()." -} - -rebar3 get-deps -echo "::set-output name=DEP_QUICER_REF::$(get_ref quicer)"