Merge pull request #33 from keynslug/fix/EMQX-12468/flush-getprop #49
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
inputs: | |
ref: | |
required: false | |
jobs: | |
mac: | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- 25.3.2-2 | |
- 26.2.1-2 | |
os: | |
- macos-14 | |
- macos-13 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: prepare | |
run: | | |
brew install curl zip unzip gnu-sed kerl wget | |
git config --global credential.helper store | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
id: cache | |
with: | |
path: ~/.kerl/${{ matrix.otp }} | |
key: otp-install-${{ matrix.otp }}-${{ matrix.os }} | |
- name: build erlang | |
if: steps.cache.outputs.cache-hit != 'true' | |
timeout-minutes: 60 | |
env: | |
OTP: ${{ matrix.otp }} | |
run: | | |
set -eux | |
if [ ! -d $HOME/.kerl/$OTP ]; then | |
kerl build git https://github.com/emqx/otp.git OTP-$OTP $OTP | |
kerl install $OTP $HOME/.kerl/$OTP | |
fi | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: install rebar3 | |
run: | | |
set -eux | |
REBAR=$(brew --prefix)/bin/rebar3 | |
if [ ! -f $REBAR ]; then | |
wget https://s3.amazonaws.com/rebar3/rebar3 -O $REBAR | |
chmod +x $REBAR | |
fi | |
- name: build | |
run: | | |
. $HOME/.kerl/${{ matrix.otp }}/activate | |
BUILD_RELEASE=1 make | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.otp }} | |
path: | | |
_packages/*.gz | |
_packages/*.gz.sha256 | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- 25.3.2-2 | |
- 26.2.1-2 | |
arch: | |
- amd64 | |
- arm64 | |
os: | |
- ubuntu24.04 | |
- ubuntu22.04 | |
- ubuntu20.04 | |
- debian12 | |
- debian11 | |
- debian10 | |
- el9 | |
- el8 | |
- el7 | |
- amzn2 | |
- amzn2023 | |
- alpine3.15.1 | |
runs-on: "aws-${{ matrix.arch }}" | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
submodules: recursive | |
# NOTE: build in container does not work because older platforms like | |
# el7 and amzn2 do not support nodejs 20 runtime which is required | |
# for github actions | |
- name: build | |
env: | |
IMAGE: ghcr.io/emqx/emqx-builder/5.3-5:1.15.7-${{ matrix.otp }}-${{ matrix.os }} | |
run: >- | |
docker run --rm -v ${PWD}:/wd ${IMAGE} bash -euc " | |
git config --global --add safe.directory '*'; | |
make -C /wd BUILD_RELEASE=1 | |
" | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.otp }} | |
path: | | |
_packages/*.gz | |
_packages/*.gz.sha256 | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') && github.eventname != 'workflow_dispatch' | |
needs: | |
- mac | |
- linux | |
steps: | |
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
pattern: erlang-rocksdb-nif-* | |
path: packages | |
merge-multiple: true | |
- name: Create Release | |
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 | |
with: | |
name: Erlang Rocksdb NIF ${{ github.ref_name }} Released | |
files: packages/* | |
draft: false | |
prerelease: false |