From 71de08da4d05a0df257075a6c75c802a272324f3 Mon Sep 17 00:00:00 2001 From: William Yang Date: Mon, 18 Sep 2023 17:19:35 +0200 Subject: [PATCH 1/3] ci: releases with openssl3 --- .github/workflows/release.yaml | 7 ++++++- pkgname.sh | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d58b96a3..1d2a5a79 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -49,6 +49,9 @@ jobs: - 5.1-3 otp: - 25.3.2-1 + openssl: + - openssl3 + - openssl elixir: - 1.14.5 arch: @@ -90,7 +93,9 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: | IMAGE=ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }} - docker run -i --rm -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} -e BUILD_RELEASE=1 $IMAGE bash -euc 'git config --global --add safe.directory /wd; make' + docker run -i --rm -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} \ + -e BUILD_RELEASE=1 -e QUIC_TLS=${{ matrix.openssl }} \ + $IMAGE bash -euc 'git config --global --add safe.directory /wd; make' - uses: actions/upload-artifact@v3 if: startsWith(github.ref, 'refs/tags/') diff --git a/pkgname.sh b/pkgname.sh index 54efc12a..6fd526be 100755 --- a/pkgname.sh +++ b/pkgname.sh @@ -29,10 +29,12 @@ esac ARCH="$(uname -m)" VSN="$(git describe --tags --exact-match | head -1)" +OPENSSL=${QUIC_TLS:-openssl} + if [ -z "$VSN" ]; then exit 0 fi OTP="$(erl -noshell -eval 'io:format(erlang:system_info(otp_release)).' -s init stop)" -echo "libquicer-${VSN}-otp${OTP}-${SYSTEM}-${ARCH}.gz" +echo "libquicer-${VSN}-otp${OTP}-${OPENSSL}-${SYSTEM}-${ARCH}.gz" From b5af0bfe1799a9394f1421e8d1b90ff7369aeba0 Mon Sep 17 00:00:00 2001 From: William Yang Date: Tue, 19 Sep 2023 09:30:49 +0200 Subject: [PATCH 2/3] fix(build): conditionally enable numa aware --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e534ba0..bcd215cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,12 @@ add_library(quicer_static STATIC ${SOURCES}) target_include_directories(quicer_static PRIVATE ${Erlang_OTP_ROOT_DIR}/usr/include/ msquic/src/inc/) if (CMAKE_SYSTEM_NAME MATCHES Linux) # note, the value of ${ATOMIC} and %{NUMA} will be set by msquic - target_link_libraries(quicer_static PRIVATE core platform inc warnings logging ${ATOMIC} ${NUMA} "-Wl,--no-gc-sections") + if (NUMA) + set(MY_NUMA ${NUMA}) + else() + set(MY_NUMA "") + endif() + target_link_libraries(quicer_static PRIVATE core platform inc warnings logging ${ATOMIC} ${MY_NUMA} "-Wl,--no-gc-sections") elseif (CMAKE_SYSTEM_NAME MATCHES Darwin) target_link_libraries(quicer_static PRIVATE core platform inc warnings "-Wl,-undefined,dynamic_lookup -Wl,-dead_strip") endif() From 86452d6b58cbcdc0a2c11772bd5cbed09bd506f3 Mon Sep 17 00:00:00 2001 From: William Yang Date: Tue, 19 Sep 2023 11:54:49 +0200 Subject: [PATCH 3/3] ci: release macos --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1d2a5a79..8f3f1262 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,12 +13,16 @@ jobs: matrix: otp: - 25.3.2-1 + openssl: + - openssl3 + - openssl os: - macos-12 - macos-11 - macos-12-arm64 runs-on: ${{ matrix.os }} steps: + - uses: emqx/setup-otp@v1.0.0 with: os: ${{ matrix.os }} @@ -30,7 +34,10 @@ jobs: - name: build release if: startsWith(github.ref, 'refs/tags/') + env: + QUIC_TLS: ${{ matrix.openssl }} run: | + export QUIC_TLS BUILD_RELEASE=1 make - uses: actions/upload-artifact@v3