Skip to content

Commit e08d74c

Browse files
authored
Merge pull request #97 from LinuxJedi/nss-squashed
NSS feature branch
2 parents 2df035e + 2ead1b1 commit e08d74c

20 files changed

Lines changed: 13407 additions & 2008 deletions

.github/workflows/clang-tidy.yml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ on:
2929
jobs:
3030
clang-tidy:
3131
runs-on: ubuntu-latest
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
config:
37+
- name: "Standard Build"
38+
configure_flags: ""
39+
- name: "NSS Build"
40+
configure_flags: "--enable-nss"
41+
- name: "TPM Build"
42+
configure_flags: "--enable-tpm"
43+
- name: "NSS+TPM Build"
44+
configure_flags: "--enable-nss --enable-tpm"
3245

3346
steps:
3447
# Checkout wolfPKCS11
@@ -46,7 +59,9 @@ jobs:
4659
clang \
4760
clang-tidy \
4861
pkg-config \
49-
git
62+
git \
63+
libnss3-dev \
64+
libnspr4-dev
5065
5166
# Build and install wolfSSL
5267
- name: Build and install wolfSSL
@@ -61,20 +76,47 @@ jobs:
6176
sudo ldconfig
6277
cd ..
6378
79+
# Setup IBM Software TPM (only if TPM enabled)
80+
- name: Setup IBM Software TPM
81+
if: contains(matrix.config.configure_flags, '--enable-tpm')
82+
run: |
83+
git clone https://github.com/kgoldman/ibmswtpm2.git
84+
cd ibmswtpm2/src
85+
make
86+
./tpm_server &
87+
cd ../..
88+
89+
# Build and install wolfTPM (only if TPM enabled)
90+
- name: Build and install wolfTPM
91+
if: contains(matrix.config.configure_flags, '--enable-tpm')
92+
run: |
93+
git clone https://github.com/wolfSSL/wolftpm.git
94+
cd wolftpm
95+
./autogen.sh
96+
./configure --enable-swtpm
97+
make -j$(nproc)
98+
sudo make install
99+
sudo ldconfig
100+
cd ..
101+
64102
# Install bear to generate compilation database
65103
- name: Install bear
66104
run: |
67105
sudo apt-get install -y bear
68106
69107
# Configure and build wolfPKCS11 to generate compilation database
70-
- name: Configure and build wolfPKCS11
108+
- name: Configure and build wolfPKCS11 (${{ matrix.config.name }})
71109
run: |
72110
./autogen.sh
73-
CC=clang CXX=clang++ ./configure --enable-all --enable-debug
111+
if [ -n "${{ matrix.config.configure_flags }}" ]; then
112+
CC=clang CXX=clang++ ./configure --enable-all --enable-debug ${{ matrix.config.configure_flags }}
113+
else
114+
CC=clang CXX=clang++ ./configure --enable-all --enable-debug
115+
fi
74116
bear -- make -j$(nproc)
75117
76118
# Run clang-tidy analysis
77-
- name: Run clang-tidy
119+
- name: Run clang-tidy (${{ matrix.config.name }})
78120
run: |
79121
# Find source files to analyze (prioritize main source files)
80122
echo "Finding source files to analyze..."
@@ -129,7 +171,7 @@ jobs:
129171
echo "Notes: $NOTES"
130172
131173
# Create a summary for the build
132-
echo "Configuration: Standard Build" >> clang-tidy-summary.txt
174+
echo "Configuration: ${{ matrix.config.name }}" >> clang-tidy-summary.txt
133175
echo "Files analyzed: $FILES_ANALYZED" >> clang-tidy-summary.txt
134176
echo "Warnings: $WARNINGS" >> clang-tidy-summary.txt
135177
echo "Errors: $ERRORS" >> clang-tidy-summary.txt
@@ -156,7 +198,7 @@ jobs:
156198
if: failure()
157199
uses: actions/upload-artifact@v4
158200
with:
159-
name: test-logs
201+
name: test-logs-${{ matrix.config.name }}
160202
path: |
161203
clang-tidy-summary.txt
162204
clang-tidy-report.txt

0 commit comments

Comments
 (0)