nginx-otel-nix/.github/workflows/nginx-otel-module-check.yml
Eugene Grebenschikov 8343ebd635 fix: apt -> apt-get
2023-06-08 12:43:34 -07:00

61 lines
2.3 KiB
YAML

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 system dependecies
run: |
sudo apt-get update && sudo apt-get install -y cmake \
libc-ares-dev libre2-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: Fix rights
run: |
chmod +x nginx/objs/nginx
chmod +x build/_deps/grpc-build/third_party/protobuf/protoc
- 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: 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 .