ci(mix): build slim packages with elixir

This commit is contained in:
Thales Macedo Garitezi 2022-01-06 09:46:32 -03:00
parent cdbf9e6586
commit 8eee61e6c4
No known key found for this signature in database
GPG Key ID: DD279F8152A9B6DD
1 changed files with 17 additions and 5 deletions

View File

@ -35,11 +35,14 @@ jobs:
- emqx-enterprise - emqx-enterprise
otp: otp:
- 24.1.5-3 - 24.1.5-3
elixir:
- 1.13.1
os: os:
- ubuntu20.04 - ubuntu20.04
- centos7 - centos7
container: "ghcr.io/emqx/emqx-builder/5.0-3:${{ matrix.otp }}-${{ matrix.os }}" # FIXME: use tagged version once merged
container: "ghcr.io/emqx/emqx-builder/elixir:${{ matrix.otp }}-${{ matrix.elixir }}-${{ matrix.os }}"
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
@ -48,6 +51,7 @@ 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
echo "EMQX_ELIXIRPKG_NAME=${{ matrix.profile }}-$(./pkg-vsn.sh)-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}-${{ matrix.os }}-amd64" >> $GITHUB_ENV
- name: Get deps git refs for cache - name: Get deps git refs for cache
id: deps-refs id: deps-refs
run: | run: |
@ -56,13 +60,17 @@ jobs:
- name: load rocksdb cache - name: load rocksdb cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: _build/default/lib/rocksdb/ path: |
key: ${{ matrix.os }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }} _build/default/lib/rocksdb/
deps/rocksdb/priv/
key: ${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }}
- name: load quicer cache - name: load quicer cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: _build/default/lib/quicer/ path: |
key: ${{ matrix.os }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_QUICER_REF }} _build/default/lib/quicer/
deps/quicer/priv/
key: ${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-amd64-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
- name: build and test tgz package - name: build and test tgz package
run: | run: |
make ${EMQX_NAME}-tgz make ${EMQX_NAME}-tgz
@ -75,6 +83,10 @@ jobs:
run: | run: |
make ${EMQX_NAME}-pkg make ${EMQX_NAME}-pkg
.ci/build_packages/tests.sh "$EMQX_PKG_NAME" pkg .ci/build_packages/tests.sh "$EMQX_PKG_NAME" pkg
- name: build and test deb/rpm packages (Elixir)
run: |
make ${EMQX_NAME}-elixirpkg
.ci/build_packages/tests.sh "$EMQX_ELIXIRPKG_NAME" elixirpkg
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ matrix.profile}}-${{ matrix.otp }}-${{ matrix.os }} name: ${{ matrix.profile}}-${{ matrix.otp }}-${{ matrix.os }}