2020-12-02 19:09:08 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script can also be run locally for testing:
|
|
|
|
# scenario=default ./build.sh
|
|
|
|
#
|
|
|
|
# When variable CIRRUS_CI is unset, this script leaves no persistent traces on the host system.
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2021-12-10 13:07:56 +00:00
|
|
|
if [[ -v CIRRUS_CI ]]; then
|
2020-12-11 12:26:07 +00:00
|
|
|
if [[ ! -e /dev/kvm ]]; then
|
|
|
|
>&2 echo "No KVM available on VM host."
|
|
|
|
exit 1
|
2020-12-02 19:09:08 +00:00
|
|
|
fi
|
2020-12-11 12:26:07 +00:00
|
|
|
# Enable KVM access for nixbld users
|
|
|
|
chmod o+rw /dev/kvm
|
2020-12-02 19:09:08 +00:00
|
|
|
fi
|
|
|
|
|
2022-08-16 19:00:00 +00:00
|
|
|
# shellcheck disable=SC2154
|
2022-08-27 11:34:39 +00:00
|
|
|
"${BASH_SOURCE[0]%/*}/../run-tests.sh" --ci --scenario "$scenario"
|