Skip to content

Commit 3bf81ba

Browse files
expand cmake CI test cases
1 parent 5a093ac commit 3bf81ba

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/cmake-build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,50 @@ jobs:
182182
LD_LIBRARY_PATH="$GITHUB_WORKSPACE/install/lib" \
183183
ctest -C Release --output-on-failure
184184
fi
185+
186+
# Verify that a static-library build can be installed and its exported
187+
# CMake targets are self-consistent. The matrix builds above use
188+
# WITH_WOLFSSL (shared library) and do not catch this because CMake only
189+
# enforces export-set completeness for static libraries: any CMake target
190+
# in a static library's PRIVATE link chain must be exported or wrapped in
191+
# $<BUILD_INTERFACE:...>.
192+
cmake-static-export:
193+
name: CMake static export check
194+
runs-on: ubuntu-latest
195+
steps:
196+
- uses: actions/checkout@master
197+
198+
- name: Install cmake
199+
run: |
200+
sudo apt-get update
201+
sudo apt-get install -y cmake
202+
203+
- name: Checkout wolfssl
204+
uses: actions/checkout@master
205+
with:
206+
repository: wolfssl/wolfssl
207+
path: wolfssl
208+
209+
- name: Build and install wolfssl
210+
working-directory: ./wolfssl
211+
run: |
212+
mkdir build && cd build
213+
cmake -DWOLFSSL_TPM=yes -DWOLFSSL_INSTALL=yes \
214+
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
215+
-DCMAKE_C_FLAGS="-DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP" ..
216+
cmake --build .
217+
cmake --install .
218+
219+
- name: Build and install wolftpm (static, cmake-config wolfssl)
220+
run: |
221+
mkdir build && cd build
222+
cmake \
223+
-DBUILD_SHARED_LIBS=OFF \
224+
-DWOLFTPM_EXAMPLES=no \
225+
-DWOLFTPM_FWTPM=no \
226+
-DWOLFTPM_BUILD_OUT_OF_TREE=yes \
227+
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/install" \
228+
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
229+
..
230+
cmake --build .
231+
cmake --install .

0 commit comments

Comments
 (0)