name: 'Create MacOS package' inputs: profile: # emqx, emqx-enterprise required: true type: string otp: # 24.2.1-1, 23.3.4.9-3 required: true type: string os: required: false type: string default: macos-11 apple_id_password: required: true type: string apple_developer_identity: required: true type: string apple_developer_id_bundle: required: true type: string apple_developer_id_bundle_password: required: true type: string runs: using: composite steps: - name: prepare shell: bash run: | brew update brew install curl zip unzip kerl coreutils openssl@1.1 echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH echo "/usr/local/bin" >> $GITHUB_PATH - uses: actions/cache@v3 id: cache with: path: ~/.kerl/${{ inputs.otp }} key: otp-install-${{ inputs.otp }}-${{ inputs.os }}-static-ssl-disable-hipe-disable-jit - name: build erlang if: steps.cache.outputs.cache-hit != 'true' shell: bash env: KERL_BUILD_BACKEND: git OTP_GITHUB_URL: https://github.com/emqx/otp KERL_CONFIGURE_OPTIONS: --disable-dynamic-ssl-lib --with-ssl=/usr/local/opt/openssl@1.1 --disable-hipe --disable-jit run: | kerl update releases kerl build ${{ inputs.otp }} kerl install ${{ inputs.otp }} $HOME/.kerl/${{ inputs.otp }} - name: build ${{ inputs.profile }} env: AUTO_INSTALL_BUILD_DEPS: 1 APPLE_SIGN_BINARIES: 1 APPLE_ID: developers@emqx.io APPLE_TEAM_ID: 26N6HYJLZA APPLE_ID_PASSWORD: ${{ inputs.apple_id_password }} APPLE_DEVELOPER_IDENTITY: ${{ inputs.apple_developer_identity }} APPLE_DEVELOPER_ID_BUNDLE: ${{ inputs.apple_developer_id_bundle }} APPLE_DEVELOPER_ID_BUNDLE_PASSWORD: ${{ inputs.apple_developer_id_bundle_password }} shell: bash run: | . $HOME/.kerl/${{ inputs.otp }}/activate make ensure-rebar3 sudo cp rebar3 /usr/local/bin/rebar3 make ${{ inputs.profile }}-tgz - name: test ${{ inputs.profile }} shell: bash run: | pkg_name=$(find _packages/${{ inputs.profile }} -mindepth 1 -maxdepth 1 -iname \*.zip) mkdir emqx unzip -d emqx $pkg_name > /dev/null # gsed -i '/emqx_telemetry/d' ./emqx/data/loaded_plugins ./emqx/bin/emqx start || cat emqx/log/erlang.log.1 ready='no' for i in {1..30}; do if curl -fs 127.0.0.1:18083/status > /dev/null; then ready='yes' break fi sleep 1 done if [ "$ready" != "yes" ]; then echo "Timed out waiting for emqx to be ready" cat emqx/log/erlang.log.1 exit 1 fi ./emqx/bin/emqx_ctl status ./emqx/bin/emqx stop rm -rf emqx