Fix for OtlpGrpcExporterOptions in otel-cpp >=1.13.0 #224
Workflow file for this run
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 instrumentation CI | |
on: | |
push: | |
branches: "*" | |
paths: | |
- 'instrumentation/nginx/**' | |
- '.github/workflows/nginx.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'instrumentation/nginx/**' | |
- '.github/workflows/nginx.yml' | |
jobs: | |
nginx-build-test: | |
name: nginx | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-18.04, debian-10.11, debian-11.3] | |
nginx-rel: [mainline, stable] | |
steps: | |
- name: checkout otel nginx | |
uses: actions/checkout@v3 | |
- name: setup | |
run: | | |
sudo ./instrumentation/nginx/ci/setup_environment.sh | |
- name: generate dockerfile | |
run: | | |
cd instrumentation/nginx/test/instrumentation | |
mix local.hex --force --if-missing | |
mix local.rebar --force --if-missing | |
mix deps.get | |
mix dockerfiles .. ${{ matrix.os }}:${{ matrix.nginx-rel }} | |
- name: setup buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
with: | |
install: true | |
- name: cache docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/buildx-cache/ | |
key: nginx-${{ matrix.os }}-${{ matrix.nginx-rel }}-${{ github.sha }} | |
restore-keys: | | |
nginx-${{ matrix.os }}-${{ matrix.nginx-rel }} | |
- name: build express backend docker | |
run: | | |
cd instrumentation/nginx | |
docker buildx build -t otel-nginx-test/express-backend \ | |
-f test/backend/simple_express/Dockerfile \ | |
--cache-from type=local,src=/tmp/buildx-cache/express \ | |
--cache-to type=local,dest=/tmp/buildx-cache/express-new \ | |
--load \ | |
test/backend/simple_express | |
- name: build nginx docker | |
run: | | |
cd instrumentation/nginx | |
docker buildx build -t otel-nginx-test/nginx \ | |
--build-arg image=$(echo ${{ matrix.os }} | sed s/-/:/) \ | |
-f test/Dockerfile.${{ matrix.os }}.${{ matrix.nginx-rel }} \ | |
--cache-from type=local,src=/tmp/buildx-cache/nginx \ | |
--cache-to type=local,dest=/tmp/buildx-cache/nginx-new \ | |
--load \ | |
. | |
- name: update cache | |
run: | | |
rm -rf /tmp/buildx-cache/express | |
rm -rf /tmp/buildx-cache/nginx | |
mv /tmp/buildx-cache/express-new /tmp/buildx-cache/express | |
mv /tmp/buildx-cache/nginx-new /tmp/buildx-cache/nginx | |
- name: run tests | |
run: | | |
cd instrumentation/nginx/test/instrumentation | |
mix test | |
- name: copy artifacts | |
id: artifacts | |
run: | | |
cd instrumentation/nginx | |
mkdir -p /tmp/otel_ngx/ | |
docker buildx build -f test/Dockerfile.${{ matrix.os }}.${{ matrix.nginx-rel}} \ | |
--target export \ | |
--cache-from type=local,src=/tmp/.buildx-cache \ | |
--output type=local,dest=/tmp/otel_ngx . | |
- name: upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: otel_ngx_module-${{ matrix.os }}-${{ matrix.nginx-rel }}.so | |
path: /tmp/otel_ngx/otel_ngx_module.so |