Skip to content

Commit

Permalink
ci: use OTP 26 by default when building packages
Browse files Browse the repository at this point in the history
also switch to Debain 12 as the base image for the Dockerfile
  • Loading branch information
id committed Jun 11, 2024
1 parent b99ff8a commit 528d74e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
otp:
- 25.3.2-2
- 26.2.5-1
elixir:
- 1.15.7
steps:
Expand Down Expand Up @@ -39,15 +39,15 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FROM=ghcr.io/emqx/emqx-builder/5.2-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian11
FROM=ghcr.io/emqx/emqx-builder/5.2-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
otp:
- 25.3.2-2
- 26.2.5-1
elixir:
- 1.15.7
quic_support:
Expand Down Expand Up @@ -88,9 +88,9 @@ jobs:
fail-fast: false
matrix:
macos:
- macos-12-arm64
- macos-14
otp:
- 25.3.2-2
- 26.2.5-1

runs-on: ${{ matrix.macos }}

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
otp:
- 25.3.2-2
- 26.2.5-1
elixir:
- 1.15.7
steps:
Expand Down Expand Up @@ -52,15 +52,15 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FROM=ghcr.io/emqx/emqx-builder/5.2-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian11
FROM=ghcr.io/emqx/emqx-builder/5.2-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
otp:
- 25.3.2-2
- 26.2.5-1
elixir:
- 1.15.7
quic_support:
Expand Down Expand Up @@ -108,11 +108,10 @@ jobs:
fail-fast: false
matrix:
macos:
- macos-12-arm64
- macos-12
- macos-13
- macos-14
otp:
- 25.3.2-2
- 26.2.5-1

runs-on: ${{ matrix.macos }}

Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
erlang 26.2.5-1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG FROM=ghcr.io/emqx/emqx-builder/5.2-7:1.15.7-25.3.2-2-debian11
ARG FROM=ghcr.io/emqx/emqx-builder/5.2-7:1.15.7-26.2.5-1-debian12
FROM ${FROM}
COPY . /emqtt_bench
WORKDIR /emqtt_bench
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
REBAR ?= $(CURDIR)/rebar3
REBAR_VERSION ?= 3.19.0-emqx-6

.PHONY: all
all: release
Expand Down Expand Up @@ -28,6 +27,6 @@ docker:

.PHONY: ensure-rebar3
ensure-rebar3:
$(CURDIR)/scripts/ensure-rebar3.sh $(REBAR_VERSION)
$(CURDIR)/scripts/ensure-rebar3.sh

$(REBAR): ensure-rebar3
16 changes: 15 additions & 1 deletion scripts/ensure-rebar3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@

set -euo pipefail

VERSION="$1"
[ "${DEBUG:-0}" -eq 1 ] && set -x

# ensure dir
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."

OTP_VSN=$(erl -noshell -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().')
case ${OTP_VSN} in
25*)
VERSION="3.19.0-emqx-9"
;;
26*)
VERSION="3.20.0-emqx-1"
;;
*)
echo "Unsupported Erlang/OTP version $OTP_VSN"
exit 1
;;
esac

DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download'

download() {
Expand Down

0 comments on commit 528d74e

Please sign in to comment.