| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- name: Scheduled build packages
- concurrency:
- group: build-${{ github.event_name }}-${{ github.ref }}
- cancel-in-progress: true
- on:
- schedule:
- - cron: '0 */6 * * *'
- workflow_dispatch:
- jobs:
- linux:
- if: github.repository_owner == 'emqx'
- runs-on: aws-${{ matrix.arch }}
- container:
- image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
- strategy:
- fail-fast: false
- matrix:
- profile:
- - ['emqx', 'master']
- - ['emqx-enterprise', 'release-51']
- - ['emqx-enterprise', 'release-52']
- otp:
- - 25.3.2-2
- arch:
- - amd64
- os:
- - debian10
- - ubuntu22.04
- - amzn2023
- builder:
- - 5.1-4
- elixir:
- - 1.14.5
- defaults:
- run:
- shell: bash
- steps:
- - uses: emqx/self-hosted-cleanup-action@v1.0.3
- - uses: actions/checkout@v3
- with:
- ref: ${{ matrix.profile[1] }}
- fetch-depth: 0
- - name: fix workdir
- run: |
- set -eu
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
- # Align path for CMake caches
- if [ ! "$PWD" = "/emqx" ]; then
- ln -s $PWD /emqx
- cd /emqx
- fi
- echo "pwd is $PWD"
- - name: build emqx packages
- env:
- PROFILE: ${{ matrix.profile[0] }}
- ACLOCAL_PATH: "/usr/share/aclocal:/usr/local/share/aclocal"
- run: |
- set -eu
- make "${PROFILE}-tgz"
- make "${PROFILE}-pkg"
- - name: test emqx packages
- env:
- PROFILE: ${{ matrix.profile[0] }}
- run: |
- set -eu
- ./scripts/pkg-tests.sh "${PROFILE}-tgz"
- ./scripts/pkg-tests.sh "${PROFILE}-pkg"
- - uses: actions/upload-artifact@v3
- if: success()
- with:
- name: ${{ matrix.profile[0] }}
- path: _packages/${{ matrix.profile[0] }}/
- - name: Send notification to Slack
- uses: slackapi/slack-github-action@v1.23.0
- if: failure()
- env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- with:
- payload: |
- {"text": "Scheduled build of ${{ matrix.profile[0] }} package for ${{ matrix.os }} failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
- mac:
- runs-on: ${{ matrix.os }}
- if: github.repository_owner == 'emqx'
- strategy:
- fail-fast: false
- matrix:
- profile:
- - emqx
- branch:
- - master
- otp:
- - 25.3.2-2
- os:
- - macos-13
- - macos-12-arm64
- steps:
- - uses: emqx/self-hosted-cleanup-action@v1.0.3
- - uses: actions/checkout@v3
- with:
- ref: ${{ matrix.branch }}
- fetch-depth: 0
- - 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
- if: success()
- with:
- name: ${{ matrix.profile }}
- path: _packages/${{ matrix.profile }}/
- retention-days: 7
- - name: Send notification to Slack
- uses: slackapi/slack-github-action@v1.23.0
- if: failure()
- env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- with:
- payload: |
- {"text": "Scheduled build of ${{ matrix.profile }} package for ${{ matrix.os }} failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
- windows:
- if: github.repository_owner == 'emqx'
- runs-on: windows-2019
- strategy:
- fail-fast: false
- matrix:
- profile:
- - emqx
- otp:
- - 25.3.2
- steps:
- - uses: actions/checkout@v3
- - uses: ilammy/msvc-dev-cmd@v1.12.0
- - uses: erlef/setup-beam@v1.16.0
- 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 10
- $pingOutput = ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx ping
- if ($pingOutput = 'pong') {
- echo "EMQX started OK"
- } else {
- echo "Failed to ping EMQX $pingOutput"
- Exit 1
- }
- ./_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 }}/*
- retention-days: 7
- - name: Send notification to Slack
- uses: slackapi/slack-github-action@v1.23.0
- if: failure()
- env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- with:
- payload: |
- {"text": "Scheduled build of ${{ matrix.profile }} package for Windows failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
|