]> git.lizzy.rs Git - nothing.git/blobdiff - appveyor.yml
Merge pull request #1255 from tsoding/1253
[nothing.git] / appveyor.yml
index deb9c8486a119b0a4db7cd6d02c17f1ac36ec664..eeeb6a5417c7951e04eba69eefe612ade58a5de9 100644 (file)
@@ -1,13 +1,52 @@
-image: ubuntu1804
+# TODO(#1183): appveyor linux build does not support clang
+image:
+  - ubuntu1804
+  - Visual Studio 2015
+  - macos
+environment: # enable mingw build on windows image
+  MSYSTEM: MINGW64
+  CHERE_INVOKING: 1
+  matrix:
+    - BUILD_TYPE: mingw
+    - BUILD_TYPE: other
+matrix:
+  exclude: # no mingw build on linux
+    - image: ubuntu1804
+      BUILD_TYPE: mingw
+    - image: macos
+      BUILD_TYPE: mingw
 install:
-  - sh: sudo apt-get update -qq
-  - sh: sudo apt-get install -qq cmake cmake-data libsdl2-dev libsdl2-mixer-dev libxml2-dev
+  - ps: |
+       if ($isWindows) {
+          if ($env:BUILD_TYPE -eq 'mingw') {
+              cmd /C 'curl -fsSL -o SDL2-devel-2.0.10-mingw.tar.gz https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz'
+              C:\msys64\usr\bin\bash.exe -lc "tar xzf SDL2-devel-2.0.10-mingw.tar.gz"
+              mv SDL2-2.0.10 SDL2
+          } else {
+              cmd /C 'curl -fsSL -o SDL2-devel-2.0.9-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip'
+              7z x SDL2-devel-2.0.9-VC.zip
+              mv SDL2-2.0.9 SDL2
+          }
+       } elseif ($isLinux) {
+           bash -c "sudo apt-get update -qq"
+           bash -c "sudo apt-get install -qq libsdl2-dev"
+       } else {
+           bash -c "brew install sdl2"
+       }
 build_script:
-  - mkdir build
-  - cd build
-  - cmake ..
-  - make
-  - ./nothing_test
-  - cd ../levels/
-  - make clean
-  - make -k
+  - ps: |
+       if ($isWindows) {
+           mkdir build
+           cd build
+           if ($env:BUILD_TYPE -eq 'mingw') {
+               C:\msys64\usr\bin\bash.exe -lc "cmake .. -G 'MSYS Makefiles' -DNOTHING_CI=ON"
+               C:\msys64\usr\bin\bash.exe -lc "cmake --build ."
+           } else {
+               cmake .. -DNOTHING_CI=ON
+               cmake --build .
+           }
+       } elseif ($isLinux) {
+           bash -c "CC=gcc ./build-posix.sh"
+       } else {
+           bash -c "CC=clang ./build-posix.sh"
+       }