Skip to content

Commit

Permalink
ci: update release workflow to support latest platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
id committed May 30, 2024
1 parent 19babf9 commit 334d304
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
45 changes: 22 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
matrix:
otp:
- 25.3.2-2
- 26.1.2-1
- 26.2.1-2
os:
- macos-12-arm64
- macos-12
- macos-11
- 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@v3
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: ~/.kerl/${{ matrix.otp }}
Expand All @@ -45,7 +44,7 @@ jobs:
kerl install $OTP $HOME/.kerl/$OTP
fi
- uses: actions/checkout@v3
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.inputs.ref }}

Expand All @@ -63,9 +62,9 @@ jobs:
. $HOME/.kerl/${{ matrix.otp }}/activate
BUILD_RELEASE=1 make
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.otp }}
path: |
_packages/*.gz
_packages/*.gz.sha256
Expand All @@ -74,16 +73,16 @@ jobs:
strategy:
fail-fast: false
matrix:
builder:
- 5.2-7:1.15.7-25.3.2-2
- 5.2-7:1.15.7-26.1.2-1
otp:
- 25.3.2-2
- 26.2.1-2
arch:
- amd64
- arm64
os:
- ubuntu24.04
- ubuntu22.04
- ubuntu20.04
- ubuntu18.04
- debian12
- debian11
- debian10
Expand All @@ -97,27 +96,26 @@ jobs:
runs-on: "aws-${{ matrix.arch }}"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.inputs.ref }}
submodules: recursive
- name: gitconfig
run: git config --global --add safe.directory ${PWD}
# NOTE: we tried to use build in container, it did not work
# so let's stick to the old way for now
# 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/${{ matrix.builder }}-${{ matrix.os }}
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@v3
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: startsWith(github.ref, 'refs/tags/')
with:
name: packages
name: erlang-rocksdb-nif-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.otp }}
path: |
_packages/*.gz
_packages/*.gz.sha256
Expand All @@ -129,12 +127,13 @@ jobs:
- mac
- linux
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packages
pattern: erlang-rocksdb-nif-*
path: packages
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
with:
name: Erlang Rocksdb NIF ${{ github.ref_name }} Released
files: packages/*
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
fail-fast: false
matrix:
builder:
- 5.2-7:1.15.7-26.1.2-1
- 5.3-5:1.15.7-26.2.1-2
os:
- ubuntu22.04
runs-on: ubuntu-22.04
- ubuntu24.04
runs-on: ubuntu-24.04

container: ghcr.io/emqx/emqx-builder/${{ matrix.builder }}-${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: recursive
- name: gitconfig
Expand Down

0 comments on commit 334d304

Please sign in to comment.