diff --git a/.travis.yml b/.travis.yml index 7989d16..ed38501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: xenial language: c compiler: gcc sudo: false @@ -5,7 +6,18 @@ sudo: false addons: apt: packages: - - clang-format-3.4 + - clang-format + - python3-pip + - python3-setuptools + - libsystemd-dev + - ninja-build + +before_script: + - pip3 install wheel + - pip3 install meson + - meson --version script: - ./scripts/format-check.sh + - ./bootstrap.sh + - gamemoded -v diff --git a/bootstrap.sh b/bootstrap.sh index b4c90e4..760a7c6 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -14,9 +14,11 @@ if [ ! -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" ]; then echo "This probably means that you have disabled processor scheduling features in your BIOS. See README.md (or GitHub issue #44) for more information." echo "This means GameMode's CPU governor control feature will not work (other features will still work)." - # Allow to continue the install, as gamemode has other useful features - read -p "Would you like to continue anyway [Y/N]? " -r - [[ $REPLY =~ ^[Yy]$ ]] + if [ "$TRAVIS" != "true" ]; then + # Allow to continue the install, as gamemode has other useful features + read -p "Would you like to continue anyway [Y/N]? " -r + [[ $REPLY =~ ^[Yy]$ ]] + fi fi # accept a prefix value as: prefix=/path ./bootstrap.sh @@ -30,8 +32,10 @@ ninja # Verify user wants to install set +x -read -p "Install to $prefix? [Yy] " -r -[[ $REPLY =~ ^[Yy]$ ]] +if [ "$TRAVIS" != "true" ]; then + read -p "Install to $prefix? [Yy] " -r + [[ $REPLY =~ ^[Yy]$ ]] +fi set -x sudo ninja install diff --git a/daemon/gamemode-sched.c b/daemon/gamemode-sched.c index e0f244c..69e8b54 100644 --- a/daemon/gamemode-sched.c +++ b/daemon/gamemode-sched.c @@ -41,6 +41,13 @@ POSSIBILITY OF SUCH DAMAGE. #include #include +/* SCHED_ISO may not be defined as it is a reserved value not yet + * implemented in official kernel sources, see linux/sched.h. + */ +#ifndef SCHED_ISO +#define SCHED_ISO 4 +#endif + /** * Priority to renice the process to. */ diff --git a/daemon/gamemode.c b/daemon/gamemode.c index 52a82f9..ccd6e0f 100644 --- a/daemon/gamemode.c +++ b/daemon/gamemode.c @@ -44,13 +44,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include -/* SCHED_ISO may not be defined as it is a reserved value not yet - * implemented in official kernel sources, see linux/sched.h. - */ -#ifndef SCHED_ISO -#define SCHED_ISO 4 -#endif - /** * The GameModeClient encapsulates the remote connection, providing a list * form to contain the pid and credentials.