From f3d5e029eea944ab0fa5e53f93d32f4e31111d16 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 28 Nov 2023 14:14:53 +0100 Subject: [PATCH 1/3] fix: race condition in otp 26 --- c_src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c_src/Makefile b/c_src/Makefile index c591ecd..5724722 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -44,12 +44,12 @@ endif LIBJQ_NAME := $(LIBJQ_DIR)/$(LIBJQ) -ERTS_INCLUDE_DIR ?= $(shell erl -noshell -s init stop -eval "io:format(\"~ts/erts-~ts/include/\", [code:root_dir(), erlang:system_info(version)]).") -ERL_INTERFACE_INCLUDE_DIR ?= $(shell erl -noshell -s init stop -eval "io:format(\"~ts\", [code:lib_dir(erl_interface, include)]).") +ERTS_INCLUDE_DIR ?= $(shell erl -noshell -eval "io:format(\"~ts/erts-~ts/include/\", [code:root_dir(), erlang:system_info(version)]), erlang:halt().") +ERL_INTERFACE_INCLUDE_DIR ?= $(shell erl -noshell -eval "io:format(\"~ts\", [code:lib_dir(erl_interface, include)]), erlang:halt().") JQ_INCLUDE_DIR ?= $(JQSRC_DIR)/src DS_INCLUDE_DIR ?= libs/c_reusable_data_structures -ERL_INTERFACE_LIB_DIR ?= $(shell erl -noshell -s init stop -eval "io:format(\"~ts\", [code:lib_dir(erl_interface, lib)]).") +ERL_INTERFACE_LIB_DIR ?= $(shell erl -noshell -eval "io:format(\"~ts\", [code:lib_dir(erl_interface, lib)]), erlang:halt().") PRIV_DIR = ../priv C_SRC_DIR = ./ From c4ace9040f0d616f1f8e63edf61a7eec3cd7b6d8 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 28 Nov 2023 14:15:10 +0100 Subject: [PATCH 2/3] ci: add otp 26 to release --- .github/workflows/eunit.yaml | 8 ++++---- .github/workflows/release.yaml | 12 +++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/eunit.yaml b/.github/workflows/eunit.yaml index e1ba039..443e230 100644 --- a/.github/workflows/eunit.yaml +++ b/.github/workflows/eunit.yaml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: otp: - - 25.3.2-1 + - 26.1.2-1 os: - macos-12-arm64 runs-on: ${{ matrix.os }} @@ -35,11 +35,11 @@ jobs: fail-fast: false matrix: builder: - - 5.1-3 + - 5.2-7 otp: - - 25.3.2-1 + - 26.1.2-1 elixir: - - 1.14.5 + - 1.15.7 os: - ubuntu22.04 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f32addf..e538372 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,8 @@ jobs: fail-fast: false matrix: otp: - - 25.3.2-1 + - 25.3.2-2 + - 26.1.2-1 os: - macos-11 - macos-12 @@ -53,11 +54,8 @@ jobs: fail-fast: false matrix: builder: - - 5.1-3 - otp: - - 25.3.2-1 - elixir: - - 1.14.5 + - 5.1-3:1.14.5-25.3.2-1 + - 5.2-7:1.15.7-26.1.2-1 arch: - amd64 - arm64 @@ -78,7 +76,7 @@ jobs: - alpine3.15.1 runs-on: ubuntu-latest env: - IMAGE: ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }} + IMAGE: ghcr.io/emqx/emqx-builder/${{ matrix.builder }}-${{ matrix.os }} steps: - uses: actions/checkout@v3 From be2de17395683ddf8c3c9941e7f14385a2b81fb1 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 28 Nov 2023 14:22:51 +0100 Subject: [PATCH 3/3] test: use io:format to replace erlang:display_nl --- test/jq_tests.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jq_tests.erl b/test/jq_tests.erl index cb7d53d..be94e33 100644 --- a/test/jq_tests.erl +++ b/test/jq_tests.erl @@ -298,7 +298,7 @@ concurrent_queries_t_() -> fun() -> NrOfScheds = erlang:system_info(schedulers), Qubes = qubes(NrOfScheds), - erlang:display_nl(), + io:format("~n", []), [(ok = concurrent_queries_test(NrOfTestProcess, true, 500, 5000)) || NrOfTestProcess <- Qubes], ok = concurrent_queries_test(NrOfScheds, false, 0, 100),