Skip to content

Commit

Permalink
Merge pull request #325 from emqx/main-0.1
Browse files Browse the repository at this point in the history
main-0.1 to main sync
  • Loading branch information
qzhuyan authored Dec 5, 2024
2 parents 33505b5 + 97d8be9 commit 992943c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ jobs:
os:
- macos-14
otp:
- 25
- 26
openssl:
- openssl3
- openssl
- sys
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -83,6 +86,8 @@ jobs:
brew install erlang@${{ matrix.otp }}
echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH
- name: release build
env:
QUICER_TLS_VER: ${{ matrix.openssl }}
run: |
wget https://s3.amazonaws.com/rebar3/rebar3
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
fail-fast: false
matrix:
otp:
- 25
- 26
openssl:
- openssl3
- openssl
- sys
os:
- macos-14
- macos-13
Expand Down Expand Up @@ -70,7 +70,6 @@ jobs:
fail-fast: false
matrix:
otp:
- 25.3.2-2
- 26.2.5.2-1
openssl:
- openssl3
Expand All @@ -83,7 +82,6 @@ jobs:
- ubuntu24.04
- ubuntu22.04
- ubuntu20.04
- ubuntu18.04
- debian12
- debian11
- debian10
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (DEFINED ENV{QUICER_TLS_VER})
endif()
set(QUIC_USE_SYSTEM_LIBCRYPTO "ON")
else()
set(QUIC_TLS $ENV{QUICER_TLS_VER})
set(QUIC_TLS $ENV{QUICER_TLS_VER} CACHE STRING "QUIC_TLS")
endif()

endif()
Expand Down Expand Up @@ -173,8 +173,12 @@ endif()

add_library(quicer_nif SHARED ${SOURCES})

# for macOS Workaround to use opensslquic head files.
target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/openssl/include")
if (OPENSSL_INCLUDE_DIR)
# for sys crypto
target_include_directories(quicer_nif PUBLIC ${OPENSSL_INCLUDE_DIR})
else()
target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/${QUIC_TLS}/include")
endif()

if (CMAKE_SYSTEM_NAME MATCHES Linux)
target_link_libraries(quicer_nif PRIVATE quicer_static "-Wl,--no-gc-sections -pthread") # no gc because of erlang nif symbols
Expand Down

0 comments on commit 992943c

Please sign in to comment.