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