generated from nginxinc/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 19
70 lines (69 loc) · 2.22 KB
/
nginx-otel-module-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: nginx-otel-module-check
run-name: ${{ github.actor }} is triggering pipeline
on:
push:
workflow_dispatch:
jobs:
build-module:
runs-on: ubuntu-latest
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 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=${GITHUB_WORKSPACE}/nginx/objs \
-DNGX_OTEL_DEV=ON ${GITHUB_WORKSPACE}
make -j $(nproc)
strip ngx_otel_module.so
- name: Archive module
uses: actions/upload-artifact@v4
with:
name: nginx-otel-module
path: build/ngx_otel_module.so
test-module:
needs: build-module
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download module
uses: actions/download-artifact@v4
with:
name: nginx-otel-module
path: build
- name: Checkout nginx
run: hg clone http://hg.nginx.org/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: Install test dependecies
working-directory: tests
run: pip install -r requirements.txt
- name: Download otelcol
uses: robinraju/release-downloader@v1.11
with:
repository: open-telemetry/opentelemetry-collector-releases
tag: v0.105.0
fileName: otelcol_0.105.0_linux_amd64.tar.gz
extract: true
- name: Run tests
working-directory: tests
env:
TEST_NGINX_GLOBALS: |
load_module ${{ github.workspace }}/build/ngx_otel_module.so;
run: pytest --log-cli-level=debug