Scheduled build packages #1364
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scheduled build packages | |
concurrency: | |
group: build-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
linux: | |
if: github.repository_owner == 'emqx' | |
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }} | |
container: | |
image: "ghcr.io/emqx/emqx-builder/${{ matrix.profile[2] }}-${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: | |
- ['emqx', 'master', '5.3-5:1.15.7-26.2.1-2'] | |
- ['emqx', 'release-57', '5.3-5:1.15.7-26.2.1-2'] | |
os: | |
- ubuntu22.04 | |
- amzn2023 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
if: success() | |
with: | |
name: ${{ matrix.profile[0] }}-${{ matrix.profile[1] }}-${{ matrix.os }} | |
path: _packages/${{ matrix.profile[0] }}/ | |
retention-days: 7 | |
- name: Send notification to Slack | |
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.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: | |
- 26.2.1-2 | |
os: | |
- macos-12-arm64 | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
if: success() | |
with: | |
name: ${{ matrix.profile }}-${{ matrix.os }} | |
path: _packages/${{ matrix.profile }}/ | |
retention-days: 7 | |
- name: Send notification to Slack | |
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.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 }}"} |