Browse Source

improve travis-ci

ruki 6 years ago
parent
commit
3b7fd2a758
2 changed files with 59 additions and 11 deletions
  1. 58 10
      .travis.yml
  2. 1 1
      packages/p/python/xmake.lua

+ 58 - 10
.travis.yml

@@ -1,28 +1,76 @@
 sudo: false
 sudo: false
 language: C
 language: C
-os:
-  - linux
-  - osx
-compiler:
-  - gcc
-  - clang
+matrix:
+  include:
+    - os: linux
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - g++-4.9
+      env:
+         - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
+         - PLAT=linux
+
+    - os: linux
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - g++-6
+      env:
+        - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
+        - PLAT=linux
+
+    - os: linux
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+      env:
+        - PLAT=android
+
+    - os: osx
+      osx_image: xcode10.1
+      env:
+        - PLAT=osx
+    
+    - os: osx
+      osx_image: xcode9.4
+      env:
+        - PLAT=osx
+
+    - os: osx
+      env:
+        - PLAT=iphoneos
+
+    - os: osx
+      env:
+        - PLAT=mingw
+
+before_install:
+    - eval "${MATRIX_EVAL}"
 
 
 install:
 install:
   - git clone --branch=dev https://github.com/xmake-io/xmake.git tboox/xmake --depth 1
   - git clone --branch=dev https://github.com/xmake-io/xmake.git tboox/xmake --depth 1
   - cd ./tboox/xmake
   - cd ./tboox/xmake
   - ./scripts/get.sh __local__
   - ./scripts/get.sh __local__
   - cd -
   - cd -
-  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
+  - if [ "$PLAT" = "android" ]; then
       wget -q https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip;
       wget -q https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip;
       unzip -q -o ./android-ndk-r19c-linux-x86_64.zip;
       unzip -q -o ./android-ndk-r19c-linux-x86_64.zip;
     fi
     fi
 
 
 script:
 script:
-  - travis_wait 60 xmake l ./scripts/test.lua -D
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+  - if [ "$PLAT" = "iphoneos" ]; then
       travis_wait 60 xmake l ./scripts/test.lua -D -p iphoneos;
       travis_wait 60 xmake l ./scripts/test.lua -D -p iphoneos;
+    elif [ "$PLAT" = "mingw" ]; then
       brew install mingw-w64;
       brew install mingw-w64;
       CC="" travis_wait 60 xmake l ./scripts/test.lua -D -p mingw;
       CC="" travis_wait 60 xmake l ./scripts/test.lua -D -p mingw;
-    else
+    elif [ "$PLAT" = "android" ]; then 
       travis_wait 60 xmake l ./scripts/test.lua -v -D -p android --ndk=`pwd`/android-ndk-r19c;
       travis_wait 60 xmake l ./scripts/test.lua -v -D -p android --ndk=`pwd`/android-ndk-r19c;
+    else
+      travis_wait 60 xmake l ./scripts/test.lua -D;
     fi
     fi

+ 1 - 1
packages/p/python/xmake.lua

@@ -39,7 +39,7 @@ package("python")
     if is_host("macosx", "linux") then
     if is_host("macosx", "linux") then
         add_deps("openssl", {host = true})
         add_deps("openssl", {host = true})
     end
     end
-
+ 
     on_load(function (package)
     on_load(function (package)
         package:data_set("install_resources", function()
         package:data_set("install_resources", function()