Expand the continuous integration coverage to more platforms / operating systems (#1612)

diff --git a/.travis.yml b/.travis.yml
index f76b982..e874076 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,34 @@
 matrix:
   include:
     - os: linux
+      dist: precise
       compiler: gcc
     - os: linux
+      dist: precise
+      compiler: clang
+    - os: linux
+      dist: trusty
+      compiler: gcc
+    - os: linux
+      dist: trusty
+      compiler: clang
+    - os: linux
+      dist: xenial
+      compiler: gcc
+    - os: linux
+      dist: xenial
       compiler: clang
     - os: osx
+      osx_image: xcode9.4
+    - os: osx
+      osx_image: xcode10
+    - os: osx
+      osx_image: xcode10.1
 sudo: false
 language: cpp
+before_install:
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install re2c             ; fi
+  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install re2c python ; fi
 script:
   - ./misc/ci.py
   - ./configure.py --bootstrap
diff --git a/appveyor.yml b/appveyor.yml
index 04ed58e..02399fa 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,5 +1,7 @@
 version: 1.0.{build}
-image: Visual Studio 2017
+image:
+  - Visual Studio 2017
+  - Ubuntu1804
 
 environment:
   CLICOLOR_FORCE: 1
@@ -7,6 +9,16 @@
   matrix:
     - MSYSTEM: MINGW64
     - MSYSTEM: MSVC
+    - MSYSTEM: LINUX
+
+matrix:
+  exclude:
+    - image: Visual Studio 2017
+      MSYSTEM: LINUX
+    - image: Ubuntu1804
+      MSYSTEM: MINGW64
+    - image: Ubuntu1804
+      MSYSTEM: MSVC
 
 for:
   -
@@ -37,4 +49,14 @@
 
         python misc/ninja_syntax_test.py
 
+  - matrix:
+      only:
+        - image: Ubuntu1804
+    build_script:
+      - ./configure.py --bootstrap
+      - ./ninja all
+      - ./ninja_test
+      - misc/ninja_syntax_test.py
+      - misc/output_test.py
+
 test: off