浏览代码

Merge pull request #97 from mdiluz/add-more-integration

Have the full bootstrap script run in the CI
Alex Smith 6 年之前
父节点
当前提交
a8539eade7
共有 4 个文件被更改,包括 29 次插入13 次删除
  1. 13 1
      .travis.yml
  2. 9 5
      bootstrap.sh
  3. 7 0
      daemon/gamemode-sched.c
  4. 0 7
      daemon/gamemode.c

+ 13 - 1
.travis.yml

@@ -1,3 +1,4 @@
+dist: xenial
 language: c
 language: c
 compiler: gcc
 compiler: gcc
 sudo: false
 sudo: false
@@ -5,7 +6,18 @@ sudo: false
 addons:
 addons:
   apt:
   apt:
     packages:
     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:
 script:
   - ./scripts/format-check.sh
   - ./scripts/format-check.sh
+  - ./bootstrap.sh
+  - gamemoded -v

+ 9 - 5
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 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)."
 	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
 fi
 
 
 # accept a prefix value as: prefix=/path ./bootstrap.sh
 # accept a prefix value as: prefix=/path ./bootstrap.sh
@@ -30,8 +32,10 @@ ninja
 
 
 # Verify user wants to install
 # Verify user wants to install
 set +x
 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
 set -x
 
 
 sudo ninja install
 sudo ninja install

+ 7 - 0
daemon/gamemode-sched.c

@@ -41,6 +41,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #include <sys/resource.h>
 #include <sys/resource.h>
 #include <sys/sysinfo.h>
 #include <sys/sysinfo.h>
 
 
+/* 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.
  * Priority to renice the process to.
  */
  */

+ 0 - 7
daemon/gamemode.c

@@ -44,13 +44,6 @@ POSSIBILITY OF SUCH DAMAGE.
 #include <stdatomic.h>
 #include <stdatomic.h>
 #include <systemd/sd-daemon.h>
 #include <systemd/sd-daemon.h>
 
 
-/* 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
  * The GameModeClient encapsulates the remote connection, providing a list
  * form to contain the pid and credentials.
  * form to contain the pid and credentials.