jimf5 is triggering pipeline #299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
uses: actions/checkout@v4 | |
with: | |
repository: nginx/nginx | |
path: 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: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Download module | |
uses: actions/download-artifact@v4 | |
with: | |
name: nginx-otel-module | |
path: build | |
- 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: Download otelcol | |
uses: robinraju/[email protected] | |
with: | |
repository: open-telemetry/opentelemetry-collector-releases | |
tag: v0.113.0 | |
fileName: otelcol_0.113.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: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt | |
pytest --log-cli-level=debug |