Skip to content

Commit

Permalink
ci: bind elixir version to otp version
Browse files Browse the repository at this point in the history
  • Loading branch information
id committed Oct 9, 2024
1 parent d1edeb1 commit 6de113d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,37 @@ jobs:
wget https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VSN}/actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz
tar zxf actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz actionlint
# TODO: enable shellcheck when all the current issues are fixed
./actionlint -color \
-shellcheck=
./actionlint -color -shellcheck=
prepare:
runs-on: ubuntu-latest
needs:
- sanity-checks
outputs:
otp: ${{ steps.otp.outputs.version }}
elixir: ${{ steps.elixir.outputs.version }}
versions: ${{ steps.versions.outputs.versions }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: get otp_version
id: otp
- name: get release versions
id: versions
run: |
otp_version=$(grep -E "^\+\sOTP-.*" ./RELEASE.md | sed 's/\+\sOTP-//g' | jq -R -s -c 'split("\n")[:-1]')
echo "version=$otp_version" >> $GITHUB_OUTPUT
- name: get elixir_version
id: elixir
run: |
elixir_version=$(grep -E "^\+\sElixir-.*" ./RELEASE.md | sed 's/\+\sElixir-//g' | jq -R -s -c 'split("\n")[:-1]')
echo "version=$elixir_version" >> $GITHUB_OUTPUT
#!/bin/bash
versions="$(grep -E "^\+\sOTP-.*" ./RELEASE.md | \
sed -E 's/\+\sOTP-([0-9.-]*),Elixir-([0-9.]*).*/{"otp":"\1","elixir":"\2"}/g' | \
jq -sc .)"
echo "versions=$versions" | tee -a $GITHUB_OUTPUT
build:
name: ${{ matrix.platform[0] }} ${{ matrix.platform[1] }} OTP-${{ matrix.otp }} Elixir-${{ matrix.elixir }}
runs-on: ${{ github.repository_owner == 'emqx' && matrix.platform[2] || '["ubuntu-latest"]' }}
needs:
- prepare

strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.prepare.outputs.versions) }}
base_image_vsn:
- "5.0"
otp: ${{ fromJSON(needs.prepare.outputs.otp) }}
elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }}
platform:
- [ubuntu24.04, linux/amd64, [self-hosted, linux, x64, ephemeral]]
- [ubuntu24.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]]
Expand Down Expand Up @@ -115,6 +111,6 @@ jobs:
build-args: |
BUILD_FROM=${{ steps.base_tag.outputs.image }}
OTP_VERSION=${{ matrix.otp }}
ELIXIR_VERSION=${{ matrix.elixir }}
ELIXIR_VERSION=${{ matrix.elixir] }}
file: ./Dockerfile
context: .
15 changes: 5 additions & 10 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
List per major version used by EMQX, quic, rocksdb builds

OTP version from emqx/otp.git:
OTP version from emqx/otp.git, Elixir version from elixir-lang/elixir.git.

+ OTP-24.3.4.2-4
+ OTP-25.3.2-2
+ OTP-26.2.5.2-1
+ OTP-27.1-1

Elixir version from elixir-lang/elixir.git:
NOTE: Only one version is allowed.

+ Elixir-1.17.3
+ OTP-24.3.4.2-4,Elixir-1.15.7
+ OTP-25.3.2-2,Elixir-1.15.7
+ OTP-26.2.5.2-1,Elixir-1.15.7
+ OTP-27.1-1,Elixir-1.17.3

0 comments on commit 6de113d

Please sign in to comment.