|
| 1 | +name: httpd instrumentation CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: "*" |
| 6 | + paths: |
| 7 | + - 'instrumentation/httpd/**' |
| 8 | + - '.github/workflows/httpd.yml' |
| 9 | + pull_request: |
| 10 | + branches: [ main ] |
| 11 | + paths: |
| 12 | + - 'instrumentation/httpd/**' |
| 13 | + - '.github/workflows/httpd.yml' |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + name: Build module |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04] |
| 23 | + steps: |
| 24 | + - name: Checkout Repo |
| 25 | + uses: actions/checkout@v2 |
| 26 | + - name: Setup buildtools |
| 27 | + run: | |
| 28 | + sudo ./instrumentation/httpd/setup-buildtools.sh |
| 29 | + sudo ./instrumentation/httpd/setup-environment.sh |
| 30 | + - name: Compile |
| 31 | + run: | |
| 32 | + cd instrumentation/httpd && ./build.sh |
| 33 | + cp bazel-out/k8-opt/bin/otel.so /tmp/mod-otel.so |
| 34 | + - name: Upload artifacts |
| 35 | + uses: actions/upload-artifact@v2 |
| 36 | + with: |
| 37 | + name: ${{ matrix.os }}_mod-otel.so |
| 38 | + path: /tmp/mod-otel.so |
| 39 | + |
| 40 | + clang_format: |
| 41 | + name: Check code formatting |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - name: Checkout Repo |
| 45 | + uses: actions/checkout@v2 |
| 46 | + - name: Setup formatting tool (clang) |
| 47 | + run: | |
| 48 | + sudo ./instrumentation/httpd/tools/setup-tools.sh code |
| 49 | + - name: Check formatting |
| 50 | + run: ./instrumentation/httpd/tools/format-code.sh |
| 51 | + |
| 52 | + build_format: |
| 53 | + name: Check build formatting |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - name: Checkout Repo |
| 57 | + uses: actions/checkout@v2 |
| 58 | + - name: Setup formatting tool (buildifier) |
| 59 | + run: | |
| 60 | + sudo ./instrumentation/httpd/tools/setup-tools.sh buildifier |
| 61 | + - name: Check formatting |
| 62 | + run: ./instrumentation/httpd/tools/format-bazel.sh |
| 63 | + |
| 64 | + e2e_tests: |
| 65 | + name: Run end-to-end tests |
| 66 | + runs-on: ${{ matrix.os }} |
| 67 | + strategy: |
| 68 | + fail-fast: false |
| 69 | + matrix: |
| 70 | + # ubuntu-16.04 tests are failing due to bug in apache2ctl script |
| 71 | + os: [ubuntu-18.04, ubuntu-20.04] |
| 72 | + steps: |
| 73 | + - name: Checkout Repo |
| 74 | + uses: actions/checkout@v2 |
| 75 | + - name: Setup buildtools |
| 76 | + run: | |
| 77 | + sudo ./instrumentation/httpd/tests/setup-tools.sh |
| 78 | + sudo ./instrumentation/httpd/setup-buildtools.sh |
| 79 | + sudo ./instrumentation/httpd/setup-environment.sh |
| 80 | + - name: Compile |
| 81 | + run: cd instrumentation/httpd && ./build.sh |
| 82 | + - name: Run tests |
| 83 | + run: | |
| 84 | + cd instrumentation/httpd && ./create-otel-load.sh |
| 85 | + sudo ./httpd_install_otel.sh |
| 86 | + cd tests && sudo ./run-all.sh |
0 commit comments