-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add IWYU (include what you use) action.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,39 @@ jobs: | |
set -eux | ||
pwd | ||
[[ "$(cat ./rnp/version.txt)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; | ||
iwyu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: true | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install cmake libjson-c-dev libbotan-2-dev asciidoctor googletest | ||
- name: Configure | ||
env: | ||
CC: clang | ||
CXX: clang++ | ||
run: | | ||
echo CORES="$(nproc --all)" >> $GITHUB_ENV | ||
cmake -B build -DBUILD_SHARED_LIBS=ON \ | ||
-DCRYPTO_BACKEND=botan \ | ||
-DDOWNLOAD_GTEST=OFF \ | ||
-DGTEST_SOURCES=/usr/src/googletest \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
-DCMAKE_BUILD_TYPE=Release . | ||
- name: Build and cwd | ||
run: | | ||
cmake --build build --parallel $CORES | ||
cd build | ||
- name: Run Include What You Use | ||
uses: EmilGedda/[email protected] | ||
with: | ||
compilation-database-path: 'build' | ||
|