Skip to content
Closed
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
build --enable_platform_specific_config
build --features=-supports_dynamic_linker
build --copt="-Wall"
build --copt="-Werror"
build:windows --copt=/wd4716

# Disable specific warnings that cause issues with external dependencies
# These warnings appear in external dependencies (BoringSSL, GoogleTest)
# and are not issues we can fix without patching those dependencies
build --copt=-Wno-array-parameter
build --copt=-Wno-stringop-overflow
build --copt=-Wno-maybe-uninitialized

# Pass PATH variable from the environment
build --action_env=PATH

Expand Down
66 changes: 42 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,63 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
format:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup clang-format
run: |
git clone https://github.com/Sarcasm/run-clang-format.git
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout clang-format
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: Sarcasm/run-clang-format
path: run-clang-format
- name: Run clang-format
run: find ./ -iname "*.h" -o -iname "*.cc" | xargs ./run-clang-format/run-clang-format.py

unit-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- run: |
echo "/opt/llvm/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- name: Run bazel test with GCC c++11
run: |
bazel test --test_output=all --cxxopt=-std=c++0x //...
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# - name: Run bazel test with GCC c++11
# run: |
# bazel test --test_output=all --cxxopt=-std=c++0x //...
- name: Run bazel test with GCC c++17
run: |
bazel test --test_output=all --cxxopt=-std=c++17 //...
- name: Run bazel test with CLANG c++11
run: |
bazel test --test_output=all -c dbg --config=clang --cxxopt=-std=c++0x //...
# - name: Run bazel test with CLANG c++11
# run: |
# bazel test --test_output=all -c dbg --config=clang --cxxopt=-std=c++0x //...
- name: Run bazel test with CLANG c++17
run: |
bazel test --test_output=all -c opt --config=clang --cxxopt=-std=c++17 //...
- name: Install cmake dependencies and run cmake compile
- name: Checkout skywalking-data-collect-protocol
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: apache/skywalking-data-collect-protocol
ref: v9.1.0
path: 3rdparty/skywalking-data-collect-protocol
- name: Checkout grpc
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: grpc/grpc
ref: v1.46.6
path: grpc
submodules: true
- name: Install cmake
run: sudo apt update && sudo apt -y install cmake
- name: Build grpc
run: |
sudo apt update
sudo apt -y install cmake
sudo git clone -b v9.1.0 https://github.com/apache/skywalking-data-collect-protocol.git ./3rdparty/skywalking-data-collect-protocol
sudo git clone -b v1.46.6 https://github.com/grpc/grpc.git --recursive
sudo cmake -S ./grpc -B ./grpc/build
sudo cmake --build ./grpc/build --parallel 8 --target install
sudo cmake -S . -B ./build
sudo cmake --build ./build
cmake -S ./grpc -B ./grpc/build
cmake --build ./grpc/build --parallel 8 --target install
- name: Build main project
run: |
cmake -S . -B ./build
cmake --build ./build
- name: Install lcov and genhtml and link llvm
run: |
sudo apt update
Expand All @@ -58,9 +76,9 @@ jobs:
./coverage.sh

e2e-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Prepare service container
run: |
docker compose -f test/e2e/docker/docker-compose.yml up -d
Expand Down
Loading