| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- name: Build slim packages
- concurrency:
- group: slim-${{ github.event_name }}-${{ github.ref }}
- cancel-in-progress: true
- on:
- push:
- branches:
- - master
- pull_request:
- # GitHub pull_request action is by default triggered when
- # opened reopened or synchronize,
- # we add labeled and unlabeled to the list because
- # the mac job dpends on the PR having a 'Mac' label
- types:
- - labeled
- - unlabeled
- - opened
- - reopened
- - synchronize
- workflow_dispatch:
- jobs:
- linux:
- runs-on: aws-amd64
- strategy:
- fail-fast: false
- matrix:
- profile:
- - ["emqx", "24.3.4.2-1", "el7"]
- - ["emqx", "25.1.2-2", "ubuntu20.04"]
- - ["emqx-enterprise", "24.3.4.2-1", "ubuntu20.04"]
- builder:
- - 5.0-26
- elixir:
- - 1.13.4
- container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
- steps:
- - uses: AutoModality/action-clean@v1
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: prepare
- run: |
- echo "EMQX_NAME=${{ matrix.profile[0] }}" >> $GITHUB_ENV
- echo "CODE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- - name: Work around https://github.com/actions/checkout/issues/766
- run: |
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
- - name: build and test tgz package
- run: |
- make ${EMQX_NAME}-tgz
- ./scripts/pkg-tests.sh ${EMQX_NAME}-tgz
- - name: run static checks
- if: contains(matrix.os, 'ubuntu')
- run: |
- make static_checks
- - name: build and test deb/rpm packages
- run: |
- make ${EMQX_NAME}-pkg
- ./scripts/pkg-tests.sh ${EMQX_NAME}-pkg
- - name: build and test tgz package (Elixir)
- run: |
- make ${EMQX_NAME}-elixir-tgz
- ./scripts/pkg-tests.sh ${EMQX_NAME}-elixir-tgz
- - name: build and test deb/rpm packages (Elixir)
- run: |
- make ${EMQX_NAME}-elixir-pkg
- ./scripts/pkg-tests.sh ${EMQX_NAME}-elixir-pkg
- - uses: actions/upload-artifact@v3
- with:
- name: "${{ matrix.profile[0] }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
- path: _packages/${{ matrix.profile[0] }}/*
- - uses: actions/upload-artifact@v3
- with:
- name: "${{ matrix.profile[0] }}_schema_dump"
- path: |
- scripts/spellcheck
- _build/${{ matrix.profile[0] }}/lib/emqx_dashboard/priv/www/static/schema.json
- windows:
- runs-on: windows-2019
- strategy:
- fail-fast: false
- matrix:
- profile:
- - emqx
- otp:
- - 25.1.2
- steps:
- - uses: actions/checkout@v3
- - uses: ilammy/msvc-dev-cmd@v1.12.0
- - uses: emqx/setup-beam@v1.16.1-emqx
- with:
- otp-version: ${{ matrix.otp }}
- - name: build
- env:
- PYTHON: python
- DIAGNOSTIC: 1
- run: |
- # ensure crypto app (openssl)
- erl -eval "erlang:display(crypto:info_lib())" -s init stop
- make ${{ matrix.profile }}-tgz
- - name: run emqx
- timeout-minutes: 5
- 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 "EMQX installed"
- ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall
- echo "EMQX uninstalled"
- - uses: actions/upload-artifact@v3
- with:
- name: windows
- path: _packages/${{ matrix.profile }}/*
- mac:
- strategy:
- fail-fast: false
- matrix:
- profile:
- - emqx
- - emqx-enterprise
- otp:
- - 24.3.4.2-1
- os:
- - macos-11
- - macos-12-arm64
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- - name: prepare
- run: |
- echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
- - uses: ./.github/actions/package-macos
- with:
- profile: ${{ matrix.profile }}
- otp: ${{ matrix.otp }}
- os: ${{ matrix.os }}
- apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
- apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
- apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
- apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
- - uses: actions/upload-artifact@v3
- with:
- name: ${{ matrix.os }}
- path: _packages/**/*
- spellcheck:
- needs: linux
- strategy:
- matrix:
- profile:
- - emqx
- - emqx-enterprise
- runs-on: aws-amd64
- steps:
- - uses: actions/download-artifact@v3
- name: Download schema dump
- with:
- name: "${{ matrix.profile }}_schema_dump"
- path: /tmp/
- - name: Run spellcheck
- run: |
- bash /tmp/scripts/spellcheck/spellcheck.sh /tmp/_build/${{ matrix.profile }}/lib/emqx_dashboard/priv/www/static/schema.json
|