From 22d6380458c115b75ec7ed7d759bb47231f3d1f6 Mon Sep 17 00:00:00 2001
From: Pavel Pautov
Date: Thu, 27 Mar 2025 19:35:53 -0700
Subject: [PATCH] Add CI workflow for Alpine Linux.
The workflow uses Nginx build system with OS provided gRPC.
---
.github/workflows/alpine.yml | 45 ++++++++++++++++++++++++++++++++++++
.github/workflows/ubuntu.yml | 2 +-
2 files changed, 46 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/alpine.yml
diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml
new file mode 100644
index 0000000..8dc0cef
--- /dev/null
+++ b/.github/workflows/alpine.yml
@@ -0,0 +1,45 @@
+name: Alpine build
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ container: alpine
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install dependencies
+ run: |
+ apk add build-base openssl-dev zlib-dev pcre2-dev \
+ cmake git grpc-dev protobuf-dev \
+ python3
+ - 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-http_ssl_module \
+ --with-http_v2_module --with-http_v3_module
+ make -j $(nproc)
+ - name: Build module
+ working-directory: nginx
+ run: |
+ NGX_OTEL_CMAKE_OPTS="-D NGX_OTEL_GRPC=package" \
+ auto/configure --with-compat --add-dynamic-module=..
+ make -j $(nproc) modules
+ - name: Install test dependencies
+ run: |
+ python -m venv tests-venv
+ tests-venv/bin/pip install -r tests/requirements.txt
+ - name: Run tests
+ run: |
+ tests-venv/bin/pytest tests --maxfail=10 --nginx=nginx/objs/nginx \
+ --module=nginx/objs/ngx_otel_module.so
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 0f328d2..07be30e 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -7,7 +7,7 @@ on:
pull_request:
jobs:
- build-module:
+ test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository