aboutsummaryrefslogtreecommitdiff
path: root/contrib/libfido2/.actions/build-linux-clang
blob: ba20f1279ec982aef66397b607c956a6438edf6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -eux

# Copyright (c) 2022 Yubico AB. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause

${CC} --version
SCAN=scan-build${CC#clang}

# Check exports.
(cd src && ./diff_exports.sh)

# Build, analyze, and install libfido2.
for T in Debug Release; do
	mkdir build-$T
	(cd build-$T && ${SCAN} --use-cc="${CC}" cmake -DCMAKE_BUILD_TYPE=$T ..)
	${SCAN} --use-cc="${CC}" --status-bugs make -j"$(nproc)" -C build-$T
	make -C build-$T regress
	sudo make -C build-$T install
done