build_slim_packages.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
  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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
  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. - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
  45. with:
  46. name: "${{ matrix.profile[0] }}-schema-dump-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
  47. path: |
  48. scripts/spellcheck
  49. _build/docgen/${{ matrix.profile[0] }}/schema-en.json
  50. retention-days: 7
  51. mac:
  52. strategy:
  53. fail-fast: false
  54. matrix:
  55. profile:
  56. - emqx
  57. os:
  58. - macos-14-arm64
  59. runs-on: ${{ matrix.os }}
  60. env:
  61. EMQX_NAME: ${{ matrix.profile }}
  62. steps:
  63. - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
  64. - name: Set up environment
  65. id: env
  66. run: |
  67. source env.sh
  68. echo "OTP_VSN=$OTP_VSN" >> "$GITHUB_OUTPUT"
  69. - uses: ./.github/actions/package-macos
  70. with:
  71. profile: ${{ matrix.profile }}
  72. otp: ${{ steps.env.outputs.OTP_VSN }}
  73. os: ${{ matrix.os }}
  74. apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
  75. apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
  76. apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
  77. apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
  78. - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
  79. with:
  80. name: ${{ matrix.os }}
  81. path: _packages/**/*
  82. retention-days: 7