name: nginx-otel-module 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 system dependecies run: | sudo apt-get update && sudo apt install -y mercurial cmake \ libc-ares-dev libre2-dev libssl-dev zlib1g-dev - name: Checkout and build nginx run: | hg clone http://hg.nginx.org/nginx/ && cd nginx && \ auto/configure --with-compat --with-debug --with-http_ssl_module \ --with-http_v2_module --with-http_v3_module && make -j 4 - name: Build module run: | mkdir build && cd build && cmake -DNGX_OTEL_NGINX_BUILD_DIR=\ ${PWD}/../nginx/objs .. && make -j 4 - name: Archive build artifacts uses: actions/upload-artifact@v3 with: name: nginx-otel-module-stuff path: | nginx/objs/nginx build/ngx_otel_module.so build/_deps/grpc-build/third_party/protobuf/protoc build/_deps/otelcpp-src/third_party/opentelemetry-proto test-module: needs: build-module runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: nginx-otel-module-stuff - name: Install system dependecies run: sudo apt-get update && sudo apt install -y mercurial curl - name: Install perl modules run: sudo cpan IO::Socket::SSL - name: Download otelcol run: | curl -LO https://github.com/\ open-telemetry/opentelemetry-collector-releases/releases/download/\ v0.76.1/otelcol_0.76.1_linux_amd64.tar.gz && \ tar -xzf otelcol_0.76.1_linux_amd64.tar.gz - name: Checkout nginx-test run: hg clone http://hg.nginx.org/nginx-tests/ - name: List files before tests run: ls -lR . - name: Run tests run: | cd tests && PERL5LIB=../nginx-tests/lib TEST_NGINX_UNSAFE=1 \ TEST_NGINX_VERBOSE=1 TEST_NGINX_BINARY=../nginx/objs/nginx \ TEST_NGINX_GLOBALS="load_module \ ${PWD}/../build/ngx_otel_module.so;" prove -v .