Merge pull request #6688 from qzhuyan/ci/william/build-cache-slim-packages
Ci/william/build cache slim packages
This commit is contained in:
commit
06abc0d552
|
@ -48,6 +48,25 @@ jobs:
|
||||||
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
|
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
|
||||||
echo "CODE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
echo "CODE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "EMQX_PKG_NAME=${{ matrix.profile }}-$(./pkg-vsn.sh)-otp${{ matrix.otp }}-${{ matrix.os }}-amd64" >> $GITHUB_ENV
|
echo "EMQX_PKG_NAME=${{ matrix.profile }}-$(./pkg-vsn.sh)-otp${{ matrix.otp }}-${{ matrix.os }}-amd64" >> $GITHUB_ENV
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
rebar3 get-deps
|
||||||
|
RocksDBRef=$(erl -noshell -eval '{ok,Raw}=file:consult("rebar.lock"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<"rocksdb">>,1, Deps), io:format("~s",[Ref]), init:stop().')
|
||||||
|
echo "::set-output name=DEP_ROCKSDB_REF::${RocksDBRef}"
|
||||||
|
QuicerRef=$(erl -noshell -eval '{ok,Raw}=file:consult("rebar.lock"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<"quicer">>,1, Deps), io:format("~s",[Ref]), init:stop().')
|
||||||
|
echo "::set-output name=DEP_QUICER_REF::${QuicerRef}"
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: _build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: _build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
- name: build and test zip package
|
- name: build and test zip package
|
||||||
run: |
|
run: |
|
||||||
make ${EMQX_NAME}-zip
|
make ${EMQX_NAME}-zip
|
||||||
|
@ -61,7 +80,6 @@ jobs:
|
||||||
name: ${{ matrix.profile}}-${{ matrix.otp }}-${{ matrix.os }}
|
name: ${{ matrix.profile}}-${{ matrix.otp }}-${{ matrix.os }}
|
||||||
path: _packages/**/*.zip
|
path: _packages/**/*.zip
|
||||||
mac:
|
mac:
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'Mac')
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -99,6 +117,28 @@ jobs:
|
||||||
kerl update releases
|
kerl update releases
|
||||||
kerl build ${{ matrix.otp }}
|
kerl build ${{ matrix.otp }}
|
||||||
kerl install ${{ matrix.otp }} $HOME/.kerl/${{ matrix.otp }}
|
kerl install ${{ matrix.otp }} $HOME/.kerl/${{ matrix.otp }}
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
. $HOME/.kerl/${{ matrix.otp }}/activate
|
||||||
|
make ensure-rebar3
|
||||||
|
sudo cp rebar3 /usr/local/bin/rebar3
|
||||||
|
rebar3 get-deps
|
||||||
|
RocksDBRef=$(erl -noshell -eval '{ok,Raw}=file:consult("rebar.lock"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<"rocksdb">>,1, Deps), io:format("~s",[Ref]), init:stop().')
|
||||||
|
echo "::set-output name=DEP_ROCKSDB_REF::${RocksDBRef}"
|
||||||
|
QuicerRef=$(erl -noshell -eval '{ok,Raw}=file:consult("rebar.lock"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<"quicer">>,1, Deps), io:format("~s",[Ref]), init:stop().')
|
||||||
|
echo "::set-output name=DEP_QUICER_REF::${QuicerRef}"
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: _build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.macos }}-${{ matrix.otp }}-macos-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- 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 }}
|
- name: build ${{ matrix.profile }}
|
||||||
run: |
|
run: |
|
||||||
. $HOME/.kerl/${{ matrix.otp }}/activate
|
. $HOME/.kerl/${{ matrix.otp }}/activate
|
||||||
|
|
Loading…
Reference in New Issue