fixes #1
This file contains hidden or 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: webserver centos9 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: "*" | |
| paths: | |
| - 'instrumentation/otel-webserver-module/**' | |
| - '.github/workflows/webserver-centos9.yml' | |
| jobs: | |
| webserver-build-test-centos9: | |
| name: webserver-centos9-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout otel webserver | |
| uses: actions/checkout@v4 | |
| - 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: apache-centos9-${{ github.sha }} | |
| # restore-keys: | | |
| # apache-centos9 | |
| - name: setup docker image | |
| run: | | |
| cd instrumentation/otel-webserver-module | |
| docker buildx build -t apache_centos9 -f docker/centos9/Dockerfile \ | |
| --load . | |
| - name: build | |
| run: | | |
| docker run -idt --name apache_centos9_container apache_centos9 /bin/bash | |
| cd instrumentation/otel-webserver-module | |
| docker exec apache_centos9_container bash -c \ | |
| 'cd /otel-webserver-module; rm -rf *;' | |
| docker cp . $(docker inspect --format="{{.Id}}" apache_centos9_container):/otel-webserver-module/ | |
| docker exec apache_centos9_container bash -c \ | |
| 'cd /otel-webserver-module; rm -rf build; \ | |
| cp -r /dependencies /otel-webserver-module/; \ | |
| cp -r /build-dependencies /otel-webserver-module/; \ | |
| ./gradlew assembleWebServerModule' | |
| - name: unit test | |
| run: | | |
| docker exec apache_centos9_container bash -c \ | |
| 'cd /otel-webserver-module; ./gradlew runUnitTest' | |
| # - name: update cache | |
| # run: | | |
| # rm -rf /tmp/buildx-cache/apache_centos9 | |
| # mv /tmp/buildx-cache/apache_centos9-new /tmp/buildx-cache/apache_centos9 | |
| - name: copy artifacts | |
| id: artifacts | |
| run: | | |
| cd instrumentation/otel-webserver-module | |
| mkdir -p /tmp/apache_centos9/ | |
| docker cp apache_centos9_container:/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \ | |
| /tmp/apache_centos9/ | |
| - name: upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: opentelemetry-webserver-sdk-x64-linux.tgz | |
| path: /tmp/apache_centos9/opentelemetry-webserver-sdk-x64-linux.tgz |