name: Ubuntu build on: push: branches: - main pull_request: jobs: build-module: runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y cmake libc-ares-dev - name: Checkout nginx uses: actions/checkout@v4 with: repository: nginx/nginx path: nginx - name: Build nginx working-directory: nginx run: | auto/configure --with-compat --with-debug --with-http_ssl_module \ --with-http_v2_module --with-http_v3_module make -j $(nproc) - name: Build module run: | mkdir build cd build cmake -DNGX_OTEL_NGINX_BUILD_DIR=${PWD}/../nginx/objs \ -DNGX_OTEL_DEV=ON .. make -j $(nproc) - name: Download otelcol run: | curl -sLo - https://github.com/\ open-telemetry/opentelemetry-collector-releases/releases/download/\ v0.115.1/otelcol_0.115.1_linux_amd64.tar.gz | tar -xzv - name: Install test dependencies run: pip install -r tests/requirements.txt - name: Run tests run: | pytest tests --maxfail=10 --nginx=nginx/objs/nginx \ --module=build/ngx_otel_module.so --otelcol=./otelcol