Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Added NGINX Buildsystem github action test. #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/nginx-buildsystem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: NGINX Build System (Alpine-based)

on:
pull_request:
push:

jobs:
build-module:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jirutka/setup-alpine@v1
with:
branch: v3.19
packages: >
cmake
g++
re2-dev
c-ares-dev
grpc-dev
git
protoc
make
protobuf-dev
perl-io-socket-ssl
perl-cryptx
openssl
pcre2-dev
- name: Clone dependencies
run: |
git clone https://github.com/nginx/nginx
git clone https://github.com/nginx/nginx-tests
git clone https://github.com/open-telemetry/opentelemetry-cpp
git clone https://github.com/open-telemetry/opentelemetry-proto
shell: alpine.sh {0}
- name: Build dependencies
working-directory: opentelemetry-cpp
run: |
cmake \
-DCMAKE_CXX_EXTENSIONS=OFF \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DCMAKE_POLICY_DEFAULT_CMP0063=NEW \
-DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/prebuilt/ \
-DCMAKE_INSTALL_PREFIX:STRING=$GITHUB_WORKSPACE/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DWITH_ABSEIL=ON \
-DWITH_BENCHMARK=OFF \
-DWITH_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
. && make -j $(nproc) install
shell: alpine.sh {0}
- name: Build module
working-directory: nginx
run: |
NGX_OTEL_PROTO_DIR=$GITHUB_WORKSPACE/opentelemetry-proto/ \
CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/prebuilt \
./auto/configure --add-dynamic-module=$GITHUB_WORKSPACE/ \
--with-compat \
&& make -j $(nproc) modules
shell: alpine.sh {0}
- name: Build nginx
working-directory: nginx
run: |
make -j $(nproc)
shell: alpine.sh {0}
- 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
shell: alpine.sh {0}
- name: Run tests
working-directory: nginx-tests
run: |
PERL5LIB=$GITHUB_WORKSPACE/nginx-tests/lib TEST_NGINX_UNSAFE=1 \
TEST_NGINX_VERBOSE=1 TEST_NGINX_GLOBALS="load_module \
${GITHUB_WORKSPACE}/nginx/objs/ngx_otel_module.so;" prove -v .
shell: alpine.sh {0}
Loading