|
8 | 8 | pull_request: |
9 | 9 | branches: [ main ] |
10 | 10 |
|
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
11 | 14 | jobs: |
12 | 15 | format: |
13 | | - runs-on: ubuntu-20.04 |
| 16 | + runs-on: ubuntu-22.04 |
14 | 17 | steps: |
15 | | - - uses: actions/checkout@v3 |
16 | | - - name: Setup clang-format |
17 | | - run: | |
18 | | - git clone https://github.com/Sarcasm/run-clang-format.git |
| 18 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 19 | + - name: Checkout clang-format |
| 20 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 21 | + with: |
| 22 | + repository: Sarcasm/run-clang-format |
| 23 | + path: run-clang-format |
19 | 24 | - name: Run clang-format |
20 | 25 | run: find ./ -iname "*.h" -o -iname "*.cc" | xargs ./run-clang-format/run-clang-format.py |
21 | 26 |
|
22 | 27 | unit-test: |
23 | | - runs-on: ubuntu-20.04 |
| 28 | + runs-on: ubuntu-22.04 |
24 | 29 | steps: |
25 | 30 | - run: | |
26 | 31 | echo "/opt/llvm/bin" >> $GITHUB_PATH |
27 | | - - uses: actions/checkout@v3 |
28 | | - - name: Run bazel test with GCC c++11 |
29 | | - run: | |
30 | | - bazel test --test_output=all --cxxopt=-std=c++0x //... |
| 32 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 33 | +# - name: Run bazel test with GCC c++11 |
| 34 | +# run: | |
| 35 | +# bazel test --test_output=all --cxxopt=-std=c++0x //... |
31 | 36 | - name: Run bazel test with GCC c++17 |
32 | 37 | run: | |
33 | 38 | bazel test --test_output=all --cxxopt=-std=c++17 //... |
34 | | - - name: Run bazel test with CLANG c++11 |
35 | | - run: | |
36 | | - bazel test --test_output=all -c dbg --config=clang --cxxopt=-std=c++0x //... |
| 39 | +# - name: Run bazel test with CLANG c++11 |
| 40 | +# run: | |
| 41 | +# bazel test --test_output=all -c dbg --config=clang --cxxopt=-std=c++0x //... |
37 | 42 | - name: Run bazel test with CLANG c++17 |
38 | 43 | run: | |
39 | 44 | bazel test --test_output=all -c opt --config=clang --cxxopt=-std=c++17 //... |
40 | | - - name: Install cmake dependencies and run cmake compile |
| 45 | + - name: Checkout skywalking-data-collect-protocol |
| 46 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 47 | + with: |
| 48 | + repository: apache/skywalking-data-collect-protocol |
| 49 | + ref: v9.1.0 |
| 50 | + path: 3rdparty/skywalking-data-collect-protocol |
| 51 | + - name: Checkout grpc |
| 52 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 53 | + with: |
| 54 | + repository: grpc/grpc |
| 55 | + ref: v1.46.6 |
| 56 | + path: grpc |
| 57 | + submodules: true |
| 58 | + - name: Install cmake |
| 59 | + run: sudo apt update && sudo apt -y install cmake |
| 60 | + - name: Build grpc |
41 | 61 | run: | |
42 | | - sudo apt update |
43 | | - sudo apt -y install cmake |
44 | | - sudo git clone -b v9.1.0 https://github.com/apache/skywalking-data-collect-protocol.git ./3rdparty/skywalking-data-collect-protocol |
45 | | - sudo git clone -b v1.46.6 https://github.com/grpc/grpc.git --recursive |
46 | | - sudo cmake -S ./grpc -B ./grpc/build |
47 | | - sudo cmake --build ./grpc/build --parallel 8 --target install |
48 | | - sudo cmake -S . -B ./build |
49 | | - sudo cmake --build ./build |
| 62 | + cmake -S ./grpc -B ./grpc/build |
| 63 | + cmake --build ./grpc/build --parallel 8 --target install |
| 64 | + - name: Build main project |
| 65 | + run: | |
| 66 | + cmake -S . -B ./build |
| 67 | + cmake --build ./build |
50 | 68 | - name: Install lcov and genhtml and link llvm |
51 | 69 | run: | |
52 | 70 | sudo apt update |
|
58 | 76 | ./coverage.sh |
59 | 77 |
|
60 | 78 | e2e-test: |
61 | | - runs-on: ubuntu-20.04 |
| 79 | + runs-on: ubuntu-22.04 |
62 | 80 | steps: |
63 | | - - uses: actions/checkout@v3 |
| 81 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
64 | 82 | - name: Prepare service container |
65 | 83 | run: | |
66 | 84 | docker compose -f test/e2e/docker/docker-compose.yml up -d |
|
0 commit comments