From b2de93bd143ef3ce10a0155b61494d9ff6b62c8e Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 16:46:54 +0000 Subject: [PATCH 1/7] Upgrade the travis docker image to use xenial Fix clang-format package name --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7989d16..015e4f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: c compiler: gcc sudo: false +dist: xenial addons: apt: packages: - - clang-format-3.4 + - clang-format script: - ./scripts/format-check.sh From 57cf99ba853663f7acd96560e5b27170b54d31e1 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 16:53:42 +0000 Subject: [PATCH 2/7] Install dependencies needed for build --- .travis.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 015e4f8..2c6dc8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,21 @@ +dist: xenial language: c compiler: gcc sudo: false -dist: xenial addons: apt: packages: - 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 From 206700919c5cc4d09106810e70494b2f03be364f Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 17:22:07 +0000 Subject: [PATCH 3/7] Only request input if we're not travis --- bootstrap.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 From 82efafd54d2859b4801a2ad8f5b6c16159f1b7fc Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 18:25:19 +0000 Subject: [PATCH 4/7] Define SCHED_ISO if not defined --- daemon/gamemode-sched.c | 7 +++++++ 1 file changed, 7 insertions(+) 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. */ From 0c35f32c5548f566a2ef936f578b0c27b141704e Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 17:18:19 +0000 Subject: [PATCH 5/7] Run bootstrap in the integration --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2c6dc8c..79ef5f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,3 +19,4 @@ before_script: script: - ./scripts/format-check.sh + - ./bootstrap.sh From 568d9b5b5140b40277409d3b48f03c6486e77aa6 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 28 Jan 2019 18:52:23 +0000 Subject: [PATCH 6/7] Run gamemoded -v as well to ensure basic functionality works --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 79ef5f1..ed38501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,3 +20,4 @@ before_script: script: - ./scripts/format-check.sh - ./bootstrap.sh + - gamemoded -v From e342b6e3940c85a4a7fbf19b484a88a975ee12d5 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Tue, 29 Jan 2019 16:38:25 +0000 Subject: [PATCH 7/7] Remove SCHED_ISO from gamemode.c As per request, no longer needed --- daemon/gamemode.c | 7 ------- 1 file changed, 7 deletions(-) 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.