]> git.lizzy.rs Git - nothing.git/blob - appveyor.yml
Merge pull request #1255 from tsoding/1253
[nothing.git] / appveyor.yml
1 # TODO(#1183): appveyor linux build does not support clang
2 image:
3   - ubuntu1804
4   - Visual Studio 2015
5   - macos
6 environment: # enable mingw build on windows image
7   MSYSTEM: MINGW64
8   CHERE_INVOKING: 1
9   matrix:
10     - BUILD_TYPE: mingw
11     - BUILD_TYPE: other
12 matrix:
13   exclude: # no mingw build on linux
14     - image: ubuntu1804
15       BUILD_TYPE: mingw
16     - image: macos
17       BUILD_TYPE: mingw
18 install:
19   - ps: |
20        if ($isWindows) {
21           if ($env:BUILD_TYPE -eq 'mingw') {
22               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'
23               C:\msys64\usr\bin\bash.exe -lc "tar xzf SDL2-devel-2.0.10-mingw.tar.gz"
24               mv SDL2-2.0.10 SDL2
25           } else {
26               cmd /C 'curl -fsSL -o SDL2-devel-2.0.9-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip'
27               7z x SDL2-devel-2.0.9-VC.zip
28               mv SDL2-2.0.9 SDL2
29           }
30        } elseif ($isLinux) {
31            bash -c "sudo apt-get update -qq"
32            bash -c "sudo apt-get install -qq libsdl2-dev"
33        } else {
34            bash -c "brew install sdl2"
35        }
36 build_script:
37   - ps: |
38        if ($isWindows) {
39            mkdir build
40            cd build
41            if ($env:BUILD_TYPE -eq 'mingw') {
42                C:\msys64\usr\bin\bash.exe -lc "cmake .. -G 'MSYS Makefiles' -DNOTHING_CI=ON"
43                C:\msys64\usr\bin\bash.exe -lc "cmake --build ."
44            } else {
45                cmake .. -DNOTHING_CI=ON
46                cmake --build .
47            }
48        } elseif ($isLinux) {
49            bash -c "CC=gcc ./build-posix.sh"
50        } else {
51            bash -c "CC=clang ./build-posix.sh"
52        }