build_slim_packages.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: Build slim packages
  2. concurrency:
  3. group: slim-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. workflow_call:
  7. workflow_dispatch:
  8. inputs:
  9. ref:
  10. required: false
  11. permissions:
  12. contents: read
  13. jobs:
  14. linux:
  15. runs-on: ${{ github.repository_owner == 'emqx' && fromJSON(format('["self-hosted","ephemeral","linux","{0}"]', matrix.profile[2])) || 'ubuntu-22.04' }}
  16. env:
  17. PROFILE: ${{ matrix.profile[0] }}
  18. ELIXIR: ${{ matrix.profile[1] == 'elixir' && 'yes' || 'no' }}
  19. ARCH: ${{ matrix.profile[2] == 'x64' && 'amd64' || 'arm64' }}
  20. BUILDER_SYSTEM: force_docker
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. profile:
  25. - ["emqx", "elixir", "x64"]
  26. - ["emqx", "elixir", "arm64"]
  27. - ["emqx-enterprise", "erlang", "x64"]
  28. steps:
  29. - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
  30. with:
  31. fetch-depth: 0
  32. - name: build tgz
  33. run: |
  34. ./scripts/buildx.sh --profile $PROFILE --pkgtype tgz --elixir $ELIXIR --arch $ARCH
  35. - name: build pkg
  36. run: |
  37. ./scripts/buildx.sh --profile $PROFILE --pkgtype pkg --elixir $ELIXIR --arch $ARCH
  38. - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
  39. with:
  40. name: "${{ matrix.profile[0] }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
  41. path: _packages/${{ matrix.profile[0] }}/*
  42. retention-days: 7
  43. compression-level: 0
  44. mac:
  45. strategy:
  46. fail-fast: false
  47. matrix:
  48. profile:
  49. - emqx
  50. os:
  51. - macos-14-arm64
  52. runs-on: ${{ matrix.os }}
  53. env:
  54. EMQX_NAME: ${{ matrix.profile }}
  55. steps:
  56. - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
  57. - name: Set up environment
  58. id: env
  59. run: |
  60. source env.sh
  61. echo "OTP_VSN=$OTP_VSN" >> "$GITHUB_OUTPUT"
  62. - uses: ./.github/actions/package-macos
  63. with:
  64. profile: ${{ matrix.profile }}
  65. otp: ${{ steps.env.outputs.OTP_VSN }}
  66. os: ${{ matrix.os }}
  67. apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
  68. apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
  69. apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
  70. apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
  71. - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
  72. with:
  73. name: ${{ matrix.os }}
  74. path: _packages/**/*
  75. retention-days: 7