From f6f2525dd71658effa09018c7d0e056bfd0ccd32 Mon Sep 17 00:00:00 2001 From: Evgeny <54681898+jimf5@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:58:46 -0700 Subject: [PATCH] fix: building with nginx with HTTP/3 (#4) --- .github/workflows/nginx-otel-module-check.yml | 31 +++++++++++++++++++ CMakeLists.txt | 3 ++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/nginx-otel-module-check.yml diff --git a/.github/workflows/nginx-otel-module-check.yml b/.github/workflows/nginx-otel-module-check.yml new file mode 100644 index 0000000..9493af5 --- /dev/null +++ b/.github/workflows/nginx-otel-module-check.yml @@ -0,0 +1,31 @@ +name: nginx-otel-module-check +run-name: ${{ github.actor }} is triggering pipeline +on: [push] +jobs: + build-module: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake libc-ares-dev libre2-dev + - name: Checkout nginx + run: hg clone http://hg.nginx.org/nginx/ + - name: Configure nginx + working-directory: nginx + run: auto/configure --with-compat + - name: Create build directory + run: mkdir build + - name: Build module + working-directory: build + run: | + cmake -DNGX_OTEL_NGINX_BUILD_DIR=${PWD}/../nginx/objs .. + make -j 4 + strip ngx_otel_module.so + - name: Archive module + uses: actions/upload-artifact@v3 + with: + name: nginx-otel-module + path: build/ngx_otel_module.so diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f204d7..96ac4cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,10 +117,13 @@ target_include_directories(ngx_otel_module PRIVATE ${NGX_OTEL_NGINX_BUILD_DIR} ${NGX_OTEL_NGINX_DIR}/src/core ${NGX_OTEL_NGINX_DIR}/src/event + ${NGX_OTEL_NGINX_DIR}/src/event/modules + ${NGX_OTEL_NGINX_DIR}/src/event/quic ${NGX_OTEL_NGINX_DIR}/src/os/unix ${NGX_OTEL_NGINX_DIR}/src/http ${NGX_OTEL_NGINX_DIR}/src/http/modules ${NGX_OTEL_NGINX_DIR}/src/http/v2 + ${NGX_OTEL_NGINX_DIR}/src/http/v3 ${PROTO_OUT_DIR}) target_link_libraries(ngx_otel_module