Merge branch 'master' of https://github.com/jnoc/fio
[fio.git] / ci / actions-build.sh
CommitLineData
ce1b5612
SW
1#!/bin/bash
2# This script expects to be invoked from the base fio directory.
3set -eu
4
5SCRIPT_DIR=$(dirname "$0")
6# shellcheck disable=SC1091
7. "${SCRIPT_DIR}/common.sh"
8
9main() {
10 local extra_cflags="-Werror"
11 local configure_flags=()
12
13 set_ci_target_os
14 case "${CI_TARGET_OS}" in
15 "linux")
16 case "${CI_TARGET_ARCH}" in
17 "i686")
18 extra_cflags="${extra_cflags} -m32"
19 export LDFLAGS="-m32"
20 ;;
21 "x86_64")
22 configure_flags+=(
23 "--enable-cuda"
24 "--enable-libiscsi"
25 "--enable-libnbd"
26 )
27 ;;
28 esac
29 ;;
30 esac
31 configure_flags+=(--extra-cflags="${extra_cflags}")
32
33 ./configure "${configure_flags[@]}"
34 make -j 2
35}
36
37main