Переглянути джерело

Travis: Use Ubuntu 18.04 (bionic) as base image

It's now available and allows us to have a better default environment,
with GCC 7.4.0 and Clang 7.

We now need GCC 7+ for C++17 support so it's more efficient to upgrade
the image than to install it on Ubuntu 16.04 (xenial).

Also fixes a couple -Wdeprecated-declarations warnings on macOS now
that we build against macOS 10.12.
Rémi Verschelde 5 роки тому
батько
коміт
6bb075a53f
2 змінених файлів з 11 додано та 12 видалено
  1. 9 10
      .travis.yml
  2. 2 2
      platform/osx/os_osx.mm

+ 9 - 10
.travis.yml

@@ -1,7 +1,7 @@
 language: cpp
 
 # OS config, depends on actual 'os' in build matrix
-dist: xenial
+dist: bionic
 
 stages:
   - build
@@ -26,8 +26,6 @@ matrix:
       compiler: gcc
       addons:
         apt:
-          sources:
-            - llvm-toolchain-xenial-8
           packages:
             - clang-format-8
 
@@ -39,14 +37,15 @@ matrix:
       addons:
         apt:
           sources:
-            - mono
-            - ubuntu-toolchain-r-test
+            - sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
+              key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc"
+            - sourceline: "ppa:ubuntu-toolchain-r/test"
           packages:
             - &gcc9_deps [gcc-9, g++-9]
             - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
             - &linux_mono_deps [mono-devel, msbuild, nuget]
 
-    - name: Linux export template (release, Clang)
+    - name: Linux export template (release, Clang 7)
       stage: build
       env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
       os: linux
@@ -101,14 +100,14 @@ matrix:
 #      addons:
 #        apt:
 #          sources:
-#            - ubuntu-toolchain-r-test
+#            - sourceline: "ppa:ubuntu-toolchain-r/test"
 #          packages:
 #            - *gcc9_deps
 #            - *linux_deps
 
-    - name: Linux export template (release_debug, GCC 5, without 3D support)
+    - name: Linux export template (release_debug, GCC 7, without 3D support)
       stage: build
-      env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes"
+      env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes"
       os: linux
       compiler: gcc
       addons:
@@ -124,7 +123,7 @@ before_install:
 
 install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
-      pyenv global 3.7.1 system;
+      pyenv global 3.7.5 system;
       pip3 install --user scons;
     fi
   - scons --version

+ 2 - 2
platform/osx/os_osx.mm

@@ -747,7 +747,7 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
 	const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
 	mm->set_position(pos);
 	mm->set_pressure([event pressure]);
-	if ([event subtype] == NSTabletPointEventSubtype) {
+	if ([event subtype] == NSEventSubtypeTabletPoint) {
 		const NSPoint p = [event tilt];
 		mm->set_tilt(Vector2(p.x, p.y));
 	}
@@ -1757,7 +1757,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) {
 	[window addButtonWithTitle:@"OK"];
 	[window setMessageText:ns_title];
 	[window setInformativeText:ns_alert];
-	[window setAlertStyle:NSWarningAlertStyle];
+	[window setAlertStyle:NSAlertStyleWarning];
 
 	// Display it, then release
 	[window runModal];