Skip to content

Commit 43543ed

Browse files
committed
Modernize workflows
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent d8b7b81 commit 43543ed

File tree

2 files changed

+49
-26
lines changed

2 files changed

+49
-26
lines changed

.bazelrc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
build --enable_platform_specific_config
22
build --features=-supports_dynamic_linker
3-
build --copt="-Wall"
4-
build --copt="-Werror"
53
build:windows --copt=/wd4716
64

5+
# Disable specific warnings that cause issues with external dependencies
6+
# These warnings appear in external dependencies (BoringSSL, GoogleTest)
7+
# and are not issues we can fix without patching those dependencies
8+
build --copt=-Wno-array-parameter
9+
build --copt=-Wno-stringop-overflow
10+
build --copt=-Wno-maybe-uninitialized
11+
712
# Pass PATH variable from the environment
813
build --action_env=PATH
914

.github/workflows/main.yml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,63 @@ on:
88
pull_request:
99
branches: [ main ]
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
format:
13-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1417
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
1924
- name: Run clang-format
2025
run: find ./ -iname "*.h" -o -iname "*.cc" | xargs ./run-clang-format/run-clang-format.py
2126

2227
unit-test:
23-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-22.04
2429
steps:
2530
- run: |
2631
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 //...
3136
- name: Run bazel test with GCC c++17
3237
run: |
3338
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 //...
3742
- name: Run bazel test with CLANG c++17
3843
run: |
3944
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
4161
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
5068
- name: Install lcov and genhtml and link llvm
5169
run: |
5270
sudo apt update
@@ -58,9 +76,9 @@ jobs:
5876
./coverage.sh
5977
6078
e2e-test:
61-
runs-on: ubuntu-20.04
79+
runs-on: ubuntu-22.04
6280
steps:
63-
- uses: actions/checkout@v3
81+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6482
- name: Prepare service container
6583
run: |
6684
docker compose -f test/e2e/docker/docker-compose.yml up -d

0 commit comments

Comments
 (0)