Merge pull request #6722 from qzhuyan/ci/william/build-cache-for-test-jobs
ci: speedup all test jobs with build cache
This commit is contained in:
commit
34e36d3618
|
@ -173,7 +173,6 @@ jobs:
|
||||||
make ensure-rebar3
|
make ensure-rebar3
|
||||||
sudo cp rebar3 /usr/local/bin/rebar3
|
sudo cp rebar3 /usr/local/bin/rebar3
|
||||||
scripts/get-dep-refs.sh
|
scripts/get-dep-refs.sh
|
||||||
make clean-all
|
|
||||||
- name: load rocksdb cache
|
- name: load rocksdb cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -286,7 +285,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd source
|
cd source
|
||||||
scripts/get-dep-refs.sh
|
scripts/get-dep-refs.sh
|
||||||
make clean-all
|
|
||||||
- name: load rocksdb cache
|
- name: load rocksdb cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -13,12 +13,37 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
otp:
|
||||||
|
- 24.1.5-3
|
||||||
|
os:
|
||||||
|
- ubuntu20.04
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: "ghcr.io/emqx/emqx-builder/5.0-3:24.1.5-3-ubuntu20.04"
|
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
scripts/get-dep-refs.sh
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-$${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
- name: build EMQ X CE and EE tgz package
|
- name: build EMQ X CE and EE tgz package
|
||||||
|
if: endsWith(github.repository, 'emqx')
|
||||||
run: |
|
run: |
|
||||||
make emqx-tgz
|
make emqx-tgz
|
||||||
make emqx-enterprise-tgz
|
make emqx-enterprise-tgz
|
||||||
|
|
|
@ -14,12 +14,31 @@ jobs:
|
||||||
otp:
|
otp:
|
||||||
- 23.3.4.9-3
|
- 23.3.4.9-3
|
||||||
- 24.1.5-3
|
- 24.1.5-3
|
||||||
|
os:
|
||||||
|
- ubuntu20.04
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-ubuntu20.04"
|
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
PATH=$PATH:./ scripts/get-dep-refs.sh
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: _build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ 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 }}-$${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
- name: run
|
- name: run
|
||||||
run: |
|
run: |
|
||||||
make ensure-rebar3
|
make ensure-rebar3
|
||||||
|
|
|
@ -44,6 +44,12 @@ jobs:
|
||||||
cluster_db_backend:
|
cluster_db_backend:
|
||||||
- mnesia
|
- mnesia
|
||||||
- rlog
|
- rlog
|
||||||
|
os:
|
||||||
|
- alpine3.14
|
||||||
|
otp:
|
||||||
|
- 24.1.5-3
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
exclude:
|
exclude:
|
||||||
- profile: emqx-edge
|
- profile: emqx-edge
|
||||||
cluster_db_backend: rlog
|
cluster_db_backend: rlog
|
||||||
|
@ -54,10 +60,29 @@ jobs:
|
||||||
path: .
|
path: .
|
||||||
- name: unzip source code
|
- name: unzip source code
|
||||||
run: unzip -q source.zip
|
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 rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
- name: make docker image
|
- name: make docker image
|
||||||
working-directory: source
|
working-directory: source
|
||||||
env:
|
env:
|
||||||
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-3:24.1.5-3-alpine3.14
|
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}
|
||||||
run: |
|
run: |
|
||||||
make ${{ matrix.profile }}-docker
|
make ${{ matrix.profile }}-docker
|
||||||
- name: run emqx
|
- name: run emqx
|
||||||
|
@ -90,6 +115,12 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
profile:
|
profile:
|
||||||
- emqx
|
- emqx
|
||||||
|
os:
|
||||||
|
- alpine3.14
|
||||||
|
otp:
|
||||||
|
- 24.1.5-3
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
# - emqx-enterprise # TODO test enterprise
|
# - emqx-enterprise # TODO test enterprise
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -99,10 +130,29 @@ jobs:
|
||||||
path: .
|
path: .
|
||||||
- name: unzip source code
|
- name: unzip source code
|
||||||
run: unzip -q source.zip
|
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 rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
- name: make docker image
|
- name: make docker image
|
||||||
working-directory: source
|
working-directory: source
|
||||||
env:
|
env:
|
||||||
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-3:24.1.5-3-alpine3.14
|
EMQX_BUILDER: ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}
|
||||||
run: |
|
run: |
|
||||||
make ${{ matrix.profile }}-docker
|
make ${{ matrix.profile }}-docker
|
||||||
echo "TARGET=emqx/${{ matrix.profile }}" >> $GITHUB_ENV
|
echo "TARGET=emqx/${{ matrix.profile }}" >> $GITHUB_ENV
|
||||||
|
|
|
@ -18,11 +18,15 @@ jobs:
|
||||||
profile:
|
profile:
|
||||||
- emqx
|
- emqx
|
||||||
- emqx-enterprise
|
- emqx-enterprise
|
||||||
otp_vsn:
|
otp:
|
||||||
- 24.1.5-3
|
- 24.1.5-3
|
||||||
|
os:
|
||||||
|
- ubuntu20.04
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp_vsn }}-ubuntu20.04"
|
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
@ -62,7 +66,7 @@ jobs:
|
||||||
set -e -x -u
|
set -e -x -u
|
||||||
cd emqx
|
cd emqx
|
||||||
export PROFILE=${{ matrix.profile }}
|
export PROFILE=${{ matrix.profile }}
|
||||||
export OTP_VSN=${{ matrix.otp_vsn }}
|
export OTP_VSN=${{ matrix.otp }}
|
||||||
echo "PROFILE=$PROFILE" >> $GITHUB_ENV
|
echo "PROFILE=$PROFILE" >> $GITHUB_ENV
|
||||||
echo "OTP_VSN=$OTP_VSN" >> $GITHUB_ENV
|
echo "OTP_VSN=$OTP_VSN" >> $GITHUB_ENV
|
||||||
if [ $PROFILE = "emqx" ];then
|
if [ $PROFILE = "emqx" ];then
|
||||||
|
@ -85,8 +89,26 @@ jobs:
|
||||||
cd emqx/_upgrade_base
|
cd emqx/_upgrade_base
|
||||||
old_vsns=($(echo $OLD_VSNS | tr ' ' ' '))
|
old_vsns=($(echo $OLD_VSNS | tr ' ' ' '))
|
||||||
for old_vsn in ${old_vsns[@]}; do
|
for old_vsn in ${old_vsns[@]}; do
|
||||||
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$old_vsn/$PROFILE-${old_vsn#[e|v]}-otp${OTP_VSN}-ubuntu20.04-amd64.tar.gz
|
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$old_vsn/$PROFILE-${old_vsn#[e|v]}-otp${OTP_VSN}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
cd emqx
|
||||||
|
scripts/get-dep-refs.sh
|
||||||
|
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: emqx/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- 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
|
- name: build emqx
|
||||||
run: make -C emqx ${PROFILE}-tgz
|
run: make -C emqx ${PROFILE}-tgz
|
||||||
- name: build emqtt-bench
|
- name: build emqtt-bench
|
||||||
|
|
|
@ -15,14 +15,35 @@ jobs:
|
||||||
run_proper_test:
|
run_proper_test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
emqx_builder:
|
otp:
|
||||||
- 5.0-3:24.1.5-3
|
- 24.1.5-3
|
||||||
|
os:
|
||||||
|
- ubuntu20.04
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: "ghcr.io/emqx/emqx-builder/${{ matrix.emqx_builder }}-ubuntu20.04"
|
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get deps git refs for cache
|
||||||
|
id: deps-refs
|
||||||
|
run: |
|
||||||
|
scripts/get-dep-refs.sh
|
||||||
|
make clean-all
|
||||||
|
- name: load rocksdb cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/rocksdb/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
|
||||||
|
- name: load quicer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: source/_build/default/lib/quicer/
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.otp }}-$${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
|
||||||
|
|
||||||
- name: proper
|
- name: proper
|
||||||
run: make proper
|
run: make proper
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue