Skip to content

Commit 03d419e

Browse files
committed
chore: use json module instead of jsx, update CI to use OTP 27
1 parent d727bf2 commit 03d419e

File tree

7 files changed

+35
-32
lines changed

7 files changed

+35
-32
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
otp:
12-
- 26.2.5-1
12+
- 27.2-3
1313
elixir:
14-
- 1.15.7
14+
- 1.18.3
1515
steps:
1616
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1717
with:
@@ -39,25 +39,28 @@ jobs:
3939
tags: ${{ steps.meta.outputs.tags }}
4040
labels: ${{ steps.meta.outputs.labels }}
4141
build-args: |
42-
FROM=ghcr.io/emqx/emqx-builder/5.3-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
42+
FROM=ghcr.io/emqx/emqx-builder/5.5-2:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
4343
4444
linux:
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
4949
otp:
50-
- 26.2.5-1
50+
- 27.2-3
5151
elixir:
52-
- 1.15.7
52+
- 1.18.3
5353
quic_support:
5454
- true
5555
- false
5656
os:
57-
- ubuntu22.04
57+
- ubuntu24.04
58+
arch:
59+
- amd64
60+
- arm64
5861

5962
container:
60-
image: ghcr.io/emqx/emqx-builder/5.3-7:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}
63+
image: ghcr.io/emqx/emqx-builder/5.5-2:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}
6164

6265
steps:
6366
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -88,9 +91,9 @@ jobs:
8891
fail-fast: false
8992
matrix:
9093
macos:
91-
- macos-14
94+
- macos-15
9295
otp:
93-
- 26.2.5-1
96+
- 27.2-3
9497

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

.github/workflows/release.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
otp:
23-
- 26.2.5-1
23+
- 27.2-3
2424
elixir:
25-
- 1.15.7
25+
- 1.18.3
2626
steps:
2727
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2828
with:
@@ -52,20 +52,21 @@ jobs:
5252
tags: ${{ steps.meta.outputs.tags }}
5353
labels: ${{ steps.meta.outputs.labels }}
5454
build-args: |
55-
FROM=ghcr.io/emqx/emqx-builder/5.3-7:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
55+
FROM=ghcr.io/emqx/emqx-builder/5.5-2:${{ matrix.elixir }}-${{ matrix.otp }}-debian12
5656
5757
linux:
5858
strategy:
5959
fail-fast: false
6060
matrix:
6161
otp:
62-
- 26.2.5.2-3
62+
- 27.2-3
6363
elixir:
64-
- 1.15.7
64+
- 1.18.3
6565
quic_support:
6666
- true
6767
- false
6868
os:
69+
- ubuntu24.04
6970
- ubuntu22.04
7071
- ubuntu20.04
7172
- debian12
@@ -76,11 +77,11 @@ jobs:
7677
- amzn2
7778
- amzn2023
7879
arch:
79-
- ""
80-
- "-arm"
81-
runs-on: ubuntu-22.04${{ matrix.arch }}
80+
- amd64
81+
- arm64
82+
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
8283
env:
83-
IMAGE: ghcr.io/emqx/emqx-builder/5.4-4:1.15.7-${{ matrix.otp }}-${{ matrix.os }}
84+
IMAGE: ghcr.io/emqx/emqx-builder/5.5-2:1.15.7-${{ matrix.otp }}-${{ matrix.os }}
8485

8586
steps:
8687
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -118,18 +119,18 @@ jobs:
118119
popd
119120
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
120121
with:
121-
name: "emqtt-bench-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ matrix.quic_support }}${{ matrix.arch }}"
122+
name: "emqtt-bench-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ matrix.quic_support }}-${{ matrix.arch }}"
122123
path: ./*.tar.gz
123124

124125
mac:
125126
strategy:
126127
fail-fast: false
127128
matrix:
128129
macos:
129-
- macos-13
130130
- macos-14
131+
- macos-15
131132
otp:
132-
- 26.2.5-1
133+
- 27.2-3
133134

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

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
erlang 27.1-1
1+
erlang 27.2-3

rebar.config

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
22
%% ex: ts=4 sw=4 ft=erlang et
3-
{minimum_otp_vsn, "23.2"}.
3+
{minimum_otp_vsn, "27.2"}.
44

55
{erl_opts, [debug_info,
66
warn_export_all,
@@ -15,11 +15,12 @@
1515
{validate_app_modules, true}.
1616

1717
{deps, [
18-
{getopt, {git, "https://github.com/zmstone/getopt", {tag, "v1.0.2.1"}}},
19-
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.14.0"}}},
18+
{getopt, "1.0.2"},
19+
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.14.5"}}},
2020
{prometheus, {git, "https://github.com/emqx/prometheus.erl", {tag, "v4.10.0.2"}}},
21-
{cowboy, "2.9.0"},
22-
{jsx, "3.1.0"}
21+
{cowlib, "2.14.0"},
22+
{ranch, {git, "https://github.com/emqx/ranch", {tag, "1.8.1-emqx-1"}}},
23+
{cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.13.0-emqx-2"}}}
2324
]}.
2425

2526
{escript_name, emqtt_bench}.

rebar.config.script

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Profiles = {profiles,[ {escript, []}
2525
, getopt
2626
, cowboy
2727
, prometheus
28-
, jsx
2928
| [ quicer || IsQuicSupp ]
3029
] }
3130
, {overlay_vars_values, [ {runner_root_dir, "$(cd $(dirname $(readlink $0 || echo $0))/..; pwd -P)"}

src/emqtt_bench.app.src

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
getopt,
99
gun,
1010
cowlib,
11-
jsx,
1211
prometheus,
1312
quantile_estimator,
1413
cowboy

src/emqtt_bench.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ publish_topic(Client, Topic, #{ name := Topic
870870
end,
871871
NewPayload =
872872
case PayloadEncoding of
873-
json -> jsx:encode(Payload1);
873+
json -> json:encode(Payload1);
874874
eterm -> maybe_prefix_payload(term_to_binary(Payload1), ClientOpts)
875875
end,
876876
update_publish_start_at(Topic),
@@ -1468,7 +1468,7 @@ parse_topics_payload(Opts) ->
14681468
undefined -> undefined;
14691469
Filename ->
14701470
{ok, Content} = file:read_file(Filename),
1471-
#{<<"topics">> := TopicSpecs} = jsx:decode(Content),
1471+
#{<<"topics">> := TopicSpecs} = json:decode(Content),
14721472
lists:foldl(fun(#{ <<"name">> := TopicName,
14731473
<<"inject_timestamp">> := WithTS,
14741474
<<"interval_ms">> := IntervalMS,

0 commit comments

Comments
 (0)