From 35110bf174792e91f97d7c6d3c6a009f7104fb31 Mon Sep 17 00:00:00 2001 From: Carlos Aragones Date: Fri, 12 Jun 2020 00:17:51 +0200 Subject: [PATCH] travis to compile Windows (Visual Studio), Linux (X11, Wayland), MacOS X(Cocoa, Metal), iOS Windows MinGW is WIP --- .travis.yml | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bc42aa9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,72 @@ +language: cpp + +jobs: + include: + - os: linux + dist: bionic + name: "Linux X11" + addons: + apt: + packages: + - libx11-dev + + - os: linux + dist: bionic + name: "Linux Wayland" + addons: + apt: + packages: + - libwayland-dev + env: + - USE_WAYLAND=ON + + - os: osx + name: "MacOS X Cocoa" + + - os: osx + name: "MacOS X Metal" + env: + - USE_METAL_API=ON + + - os: osx + name: "MacOS iOS" + env: + - USE_IOS=ON + + - os: windows + name: "Windows Visual Studio" + env: + - USE_WINDOWS=ON + +script: + - mkdir build + - cd build + - echo off + - echo "---------" + - echo "Config..." + - echo "---------" + - if [ $TRAVIS_OS_NAME = 'osx' ]; then + if test -n "${USE_IOS}"; then + cmake .. -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 ; + elif test -n "${USE_METAL_API}"; then + cmake .. -USE_METAL_API=ON; + else + cmake ..; + fi + elif [ $TRAVIS_OS_NAME = 'linux' ]; then + if test -n "${USE_WAYLAND}"; then + cmake .. -DUSE_WAYLAND=ON; + else + cmake ..; + fi + else + cmake ..; + fi + - echo "--------" + - echo "Build..." + - echo "--------" + - if test -n "${USE_IOS}"; then + cmake --build . --target minifb ; + else + cmake --build . ; + fi