xref: /freebsd/contrib/libfido2/.actions/build-linux-gcc (revision e63d20b70ee1dbee9b075f29de6f30cdcfe1abe1)
1#!/bin/sh -eux
2
3# Copyright (c) 2022 Yubico AB. All rights reserved.
4# Use of this source code is governed by a BSD-style
5# license that can be found in the LICENSE file.
6# SPDX-License-Identifier: BSD-2-Clause
7
8${CC} --version
9
10# Build and install libfido2.
11for T in Debug Release; do
12	mkdir build-$T
13	(cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..)
14	make -j"$(nproc)" -C build-$T
15	make -C build-$T regress
16	sudo make -C build-$T install
17done
18
19# Check udev/fidodevs.
20[ -x "$(which update-alternatives)" ] && {
21	sudo update-alternatives --set awk "$(which original-awk)"
22}
23udev/check.sh udev/fidodevs
24