Skip to content

Commit 96b6416

Browse files
authored
Merge branch 'main' into test_examples_with_install
2 parents 68e9d5f + 470f66b commit 96b6416

File tree

7 files changed

+53
-18
lines changed

7 files changed

+53
-18
lines changed

.devcontainer/Dockerfile.dev

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ ENV GRPC_VERSION=${GRPC_VERSION}
2222
COPY ci /opt/ci
2323

2424
RUN apt update && apt install -y wget \
25-
ninja-build \
26-
libcurl4-openssl-dev \
27-
clang-tidy \
28-
shellcheck
25+
ninja-build \
26+
llvm-dev \
27+
libclang-dev \
28+
libcurl4-openssl-dev \
29+
clang-tidy \
30+
shellcheck
2931

3032
RUN cd /opt/ci && bash setup_cmake.sh
3133
RUN cd /opt/ci && bash setup_ci_environment.sh
34+
RUN cd /opt/ci && bash install_iwyu.sh
3235
RUN cd /opt && bash ci/setup_googletest.sh \
3336
&& bash ci/install_abseil.sh \
3437
&& bash ci/install_protobuf.sh \

.github/workflows/clang-tidy.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
sudo apt update -y
3232
sudo apt install -y --no-install-recommends --no-install-suggests \
3333
build-essential \
34-
iwyu \
3534
cmake \
3635
libssl-dev \
3736
libcurl4-openssl-dev \

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
sudo -E ./ci/setup_googletest.sh
4040
sudo -E ./ci/setup_ci_environment.sh
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
42+
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
4343
with:
4444
languages: cpp
4545
- name: Autobuild
46-
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
46+
uses: github/codeql-action/autobuild@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
48+
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19

.github/workflows/iwyu.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,23 @@ jobs:
2828
sudo apt update -y
2929
sudo apt install -y --no-install-recommends --no-install-suggests \
3030
build-essential \
31-
iwyu \
3231
ninja-build \
3332
libssl-dev \
3433
libcurl4-openssl-dev \
34+
libabsl-dev \
3535
libprotobuf-dev \
36+
libgrpc++-dev \
3637
protobuf-compiler \
38+
protobuf-compiler-grpc \
3739
libgmock-dev \
3840
libgtest-dev \
39-
libbenchmark-dev
41+
libbenchmark-dev \
42+
llvm-dev \
43+
libclang-dev
4044
sudo ./ci/setup_cmake.sh
41-
42-
43-
- name: setup grpc
45+
- name: Install include-what-you-use
4446
run: |
45-
sudo ./ci/setup_grpc.sh
46-
47+
sudo ./ci/install_iwyu.sh
4748
- name: Prepare CMake
4849
run: |
4950
TOPDIR=`pwd`
@@ -80,11 +81,13 @@ jobs:
8081
- name: count warnings
8182
run: |
8283
set +e
84+
echo "include-what-you-use version:"
85+
include-what-you-use --version
8386
cd build
8487
readonly WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu.log`
8588
echo "include-what-you-use reported ${WARNING_COUNT} warning(s)"
8689
# Acceptable limit, to decrease over time down to 0
87-
readonly WARNING_LIMIT=0
90+
readonly WARNING_LIMIT=122
8891
# FAIL the build if WARNING_COUNT > WARNING_LIMIT
8992
if [ $WARNING_COUNT -gt $WARNING_LIMIT ] ; then
9093
exit 1

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ jobs:
4747
# Upload the results to GitHub's code scanning dashboard (optional).
4848
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4949
- name: "Upload to code-scanning"
50-
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
50+
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
5151
with:
5252
sarif_file: results.sarif

ci/install_iwyu.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Copyright The OpenTelemetry Authors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -e
7+
8+
INSTALL_PREFIX="/usr/local"
9+
10+
LLVM_VERSION=$(llvm-config --version 2>/dev/null | cut -d. -f1)
11+
12+
if [ -z "$LLVM_VERSION" ]; then
13+
echo "Error: LLVM not found. Exiting."
14+
exit 1
15+
fi
16+
17+
echo "LLVM_VERSION=$LLVM_VERSION"
18+
echo "Installing IWYU..."
19+
20+
cd /tmp
21+
git clone --depth 1 --branch clang_$LLVM_VERSION https://github.com/include-what-you-use/include-what-you-use.git
22+
cd include-what-you-use
23+
mkdir -p build
24+
cd build
25+
26+
cmake -DCMAKE_PREFIX_PATH=/usr/lib/llvm-$LLVM_VERSION -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ..
27+
make -j$(nproc)
28+
make install
29+
30+
echo "IWYU install complete. Verifying installation..."
31+
include-what-you-use --version

ci/setup_ci_environment.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ apt-get install --no-install-recommends --no-install-suggests -y \
1212
git \
1313
valgrind \
1414
lcov \
15-
iwyu \
1615
pkg-config

0 commit comments

Comments
 (0)